module RubyMud # Flags are added to objects, some of the logic # can then check if a specific flag has been # added to an object. Thus the presence of a # flag 'indicates true' class Flag # ########## # Properties # ########## attr_accessor :owner # Can the user see this flag on himself def Flag.visible? return false end # Can the user add/remove this flag def Flag.changeable? return false end # Can there be more than one on the owner ? def Flag.moreThanOne? return false end # This will be called when the flag is removed from the owner # AND before the player is removed from the mud # Note that the flags will still stay on the player object def beforeRemove() end # This should be called when the object is initialized # AND when the player is added to the mud def onStartup() end # ########### # Constructor # ########### def initialize(owner) @owner = owner owner.addFlag(self) end end end #module