For fun I recreated function-based infix operator in Luau using metatables
I’m using __idiv as an example, but you can use any binary operator that has a metamethod for it
--im not smart enough to use strict type-checking for this. hence no --!strict.
--the annotations below might not even be correct lol
type mulMetamethod = ((v1: number, v2: mul) -> mul) & ((v1: mul, v2: number) -> number)
local mul: {temp: number?} = {}
setmetatable(mul, {
__idiv = function(v1: number|mul, v2: mul|number): mul|number
if type(v1)=='number' and type(v2)=='table' then
v2.temp = v1
return v2
elseif type(v1)=='table' and v1.temp and type(v2)=='number' then
local _r: number = v1.temp * v2
v1.temp = nil
return _r
else
error('infix error')
end
end::mulMetamethod,
})
type mul = typeof(mul)
print(1 //mul// 2) --> 2
print(100 //mul// .5) --> 50
print(`200 multiplied by 1/200 is {200 //mul// (1/200)}`)
Howdy y’all, merry late Christmas!
I’ve been working on a recreation of Giant Survival in the past month or two. Here are a few screenshots I’ve gathered from playtesting,
I have had a lot of players tell me that they spent all their money on something like farmland and now have no way of earning money. My solution to that is a bank where you can take out loans.
The bank will have some sort of interest rate system. Loans are probably going to be capped at about $1000 out at a time, and the amount you will need to pay back will most likely be capped at $5000.
Sorry M0D, but you can’t be in $1M in Boredom Farming debt.
Here is the building of the bank.
Along with that, the farm edit mode will be fixed up.
Players will be able to sail with +10 of our old ships from the past 7 years of the group’s existence.
The game is going to be released on January 1st!
A port of an Among Us mod over to ROBLOX. Been working on it since June of last year and it’s about finished. I am making it for this discord server for about 5k people and it’s been delayed twice so they are pretty antsy… (its a solo project as well)