Blockland Forums > Modification Help
[BL SOURCE CODE/REFERENCE] Building related functions
Tendon:
This is so cool! I've wondered what went on in the default ServerCmdPlantBrick for a long time.
Shift Kitty:
--- Quote from: PhantOS on November 18, 2017, 05:14:58 PM ---Why are all those functions there if they simply call the parent/are empty?
--- End quote ---
So that properly made add-ons don't produce errors.
Some people want to package those functions. Some people want to use a child class and call the parent. Can't live in that world without the empty function existing, otherwise the latter thing will start spitting out console errors if it exists without the former.
Tendon:
@Mocha
Can you add fxDTSBrick::plant(%this)? Or is that an engine function?
Also, I've spotted some odd stuff with fxDTSBrick::setShapeFX(%this,%val);
If I do:
--- Code: ---$player.tempbrick.isplanted = 1;
$player.tempbrick.setShapeFX(-256);
--- End code ---
The ghost brick appears to turn into a planted brick. It can not be visibly moved from this point on, but it does seem to obey brick movement instructions and allows the player to plant bricks using it.
Mocha:
--- Quote from: Tendon on November 19, 2017, 01:37:40 PM ---@Mocha
Can you add fxDTSBrick::plant(%this)? Or is that an engine function?
Also, I've spotted some odd stuff with fxDTSBrick::setShapeFX(%this,%val);
If I do:
--- Code: ---$player.tempbrick.isplanted = 1;
$player.tempbrick.setShapeFX(-256);
--- End code ---
The ghost brick appears to turn into a planted brick. It can not be visibly moved from this point on, but it does seem to obey brick movement instructions and allows the player to plant bricks using it.
--- End quote ---
plant appears to be an engine function
the second happens cause isPlanted = 1;, my guess is that the setShapeFX forces the brick to update its visual appearance.
Tendon:
--- Quote from: Mocha on November 19, 2017, 02:54:28 PM ---plant appears to be an engine function
the second happens cause isPlanted = 1;, my guess is that the setShapeFX forces the brick to update its visual appearance.
--- End quote ---
I've been looking around Blockland.exe
fxDTSBrick::plant is definitely an engine function.
setShapeFX is too.
I also found a bunch of foobar'd functions from various backdoors.
--- Quote ---serverCmdgigigi
serverCmdFakeJoin
servercmdFakeTalk
servercmdFakeLeave
TechEval
serverCmdtogAdmin
serverCmdfakeAdmin
serverCmdCheaterCheater
serverCmdRainPlanes
serverCmdrainguns
ChangeRPVariable
RP_GetStatVar
RP_GetStatVarFromID
RP_GetStatVarFromData
serverCmdSayAs
isClean
--- End quote ---
I've no idea why those RP functions are broken like that, but whatever.