Switch to edit mode.
Name(s): @clearp*roperty @clprop*erty @clear-property1: "Copied from Generic Programming student&&Etudiant d'informatique generique (#3924):@clearp by Sleeping_Beauty (#2) Sat Jul 1 06:29:14 1995 EDT"
2: "@clearproperty <obj>.<prop>"
3: "Set the value of <obj>.<prop> to `clear', making it appear to be the same as the property on its parent."
4: if (player != this)
5: $msg:mtell("huh")
6: return
7: endif
8: set_task_perms(player)
9: if (!(l = $code_utils:parse_propref(dobjstr)))
10: player:notify(tostr("Usage: ", verb, " <object>.<property>"))
11: elseif ($command_utils:object_match_failed(dobj = player:my_match_object(l[1]), l[1]))
12: "... bogus object..."
13: elseif (is_clear_property(dobj, prop = l[2]))
14: player:notify(tostr("Property ", dobj, ".", prop, " is already clear!"))
15: elseif ((result = clear_property(dobj, prop)) == E_INVARG)
16: player:notify(tostr("You can't clear ", dobj, ".", prop, "; none of the ancestors define that property."))
17: elseif (typeof(result) == $ERR)
18: player:notify(tostr(result))
19: else
20: player:notify(tostr("Property ", dobj, ".", prop, " cleared; value is now ", toliteral(dobj.(prop)), "."))
21: endif
22: "Last modified by Dax (#789) on Tue May 3 13:45:55 2005 MDT."