Ran into some design problems while working on #45, with the Hook script_config. There was no way to easily communicate what the key/value pairs were for each different script_config based on the script the Hook pointed at.
So I've re-examined Tunnels, Teleport, and Hook and come up with a more simplistic architecture that may avoid the problem for now.
Changes
Hooks
[x] Remove Hook component
[x] Remove Script component
We'll move hooks directly to the component they involve, and require them to be scripted there directly
[x] Add on_enter hook to Container
Tunnels
Tunnels will be implemented using the Container max_volume field
[x] Implement Corporeal component that has weight & volume
[x] Update character & races to specify default weight/volume
[x] Update Container to have max_weight, volume, weight
[ ] Update move_entity to calculate & update volume and weight
[x] Update move_entity to return :full if the entity will not fit in dest
[x] Update directional commands to print error when move_entity returns full
[x] Remove tunnel script
[x] Update wbr importer to set max_volume on container components
[x] Update Tests
Teleporters
[x] Remove teleport script
[x] Update TeleporterComponent to include look, message
[x] Update TeleportComponent to include teleporter, remove look & message
[x] Figure out messaging; show to char, show to room
[x] Update move_entity to manage TeleportComponent
Ran into some design problems while working on #45, with the Hook
script_config
. There was no way to easily communicate what the key/value pairs were for each differentscript_config
based on thescript
the Hook pointed at.So I've re-examined Tunnels, Teleport, and Hook and come up with a more simplistic architecture that may avoid the problem for now.
Changes
on_enter
hook to Containermax_volume
fieldweight
&volume
max_weight
,volume
,weight
Updatemove_entity
to calculate & updatevolume
andweight
move_entity
to return:full
if theentity
will not fit indest
move_entity
returns fullmax_volume
on container componentslook
,message
teleporter
, removelook
&message
move_entity
to manage TeleportComponent