X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;ds=sidebyside;f=src%2Fserver%2Fthing_actions.h;h=ebdd871f02724159368ab56f982b9560eeede0c7;hb=0f015c3004d6c2282e84c34c31d10b952fefee20;hp=861f5c233ab351cbc26d1230d9ba1d3b649492c2;hpb=d92f16d5959fc846d3eaf669517eecb3969cda08;p=plomrogue diff --git a/src/server/thing_actions.h b/src/server/thing_actions.h index 861f5c2..ebdd871 100644 --- a/src/server/thing_actions.h +++ b/src/server/thing_actions.h @@ -1,4 +1,8 @@ /* src/server/thing_actions.h + * + * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3 + * or any later version. For details on its copyright, license, and warranties, + * see the file NOTICE in the root directory of the PlomRogue source package. * * Actions that can be performed by living things / "actors". Note that apart * from the consequences described below, each action may also trigger log @@ -8,28 +12,10 @@ #ifndef THING_ACTIONS_H #define THING_ACTIONS_H -#include /* uint8_t */ struct Thing; -struct ThingAction -{ - uint8_t id; /* identifies action in Thing.command; therefore must be >0 */ - struct ThingAction * next; - void (* func) (struct Thing *); /* function called after .effort turns */ - char * name; /* human-readable identifier */ - uint8_t effort; /* how many turns the action takes */ -}; - - - -/* Free ThingAction * chain starting at "ta". */ -extern void free_thing_actions(struct ThingAction * ta); - -/* Return world.thing_actions ThingAction.id for "name". */ -extern uint8_t get_thing_action_id_by_name(char * name); - /* Actor "t" does nothing. */ extern void actor_wait(struct Thing * t); @@ -52,6 +38,11 @@ extern void actor_pick(struct Thing * t); */ extern void actor_use(struct Thing * t); +/* Decrement "t"'s satiation and trigger a chance (dependent on over-/under- + * satiation value) of lifepoint decrement. + */ +extern void hunger(struct Thing * t); + #endif