-
Notifications
You must be signed in to change notification settings - Fork 177
Adding new trash receptacles
In our example room we have two objects:
>;eq echo DRRoom.room_objs [exec1: ["sprig of four-leafed clover", "tangle of thick roots forming a dark gap"]]
We use DRC.get_noun to get the noun of the receptacle (in this case, it’s the "tangle of thick roots forming a dark gap")
>;eq echo DRRoom.room_objs.reject { |obj| obj =~ /azure \w+ tree/ }.map { |long_name| DRC.get_noun(long_name) } [exec1: ["sprig", "tangle"]]
The noun according to lich is "tangle" which is what we append to @@trash_storage in common-items.lic
In this case, we don’t actually use "tangle" in game, the in-game noun is "gap", hence we need to create a special case to map the "tangle" to "gap".
Note I opted to make it a "dark gap" which works in game, and is more specific than plain "gap". Try to always use adjective+noun when possible.
>put my rock in tangle What were you referring to? >put my rock in dark gap You drop a rock in a tangle of thick roots forming a dark gap.
In the DRCI.dispose_trash method, we need to add an elsif
for this
elsif trashcan == 'tangle' trashcan = 'dark gap' if DRRoom.room_objs.include?('tangle of thick roots forming a dark gap')
If by contrast, "put my rock in tangle" worked, we wouldn’t need this special case, and just appending "tangle" to @@trash_storage
would have sufficed.