mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
You can now commit suicide using certain items! There will be more items to come, this really just lays the groundwork.
Credit goes to CodenameB and Spike68 for the original proposed commit. Althought it ended up changing, this commit still uses all of their suicide messages. Thanks to carn for pseudo-coding the base of the system that I ended up using to implement this. The suicide verb checks the item in your active hand and calls that item's suicide_act(). (/obj/item/proc/suicide_act(mob/user)) The proc displays the suicide message to any viewers and returns a damage type. The suicide verb then applies 175 damage to the mob divided by the number of damage types. If the proc returns null (meaning that the item does not have a suicide_act() defined) the regular suicide occurs. To any coder wanting to add items to this: - You MUST return one or more damage types. "return (BRUTELOSS|FIRELOSS)" for example. - Please do not manually type in the item's name; use [src] to refrence an it instead. It'll save time down the road if an item gets renamed. It also helps handle any child of that item without copy/pasting the proc to each child. - Please do not use 'usr' for anything. Parrots can now see which item they are holding onto in the stat panel. The toy crossbow should once again work properly. Fixes Issue 1227. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5468 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -409,6 +409,7 @@ var/list/global_mutations = list() // list of hidden mutation things
|
||||
|
||||
|
||||
//Damage things //TODO: merge these down to reduce on defines
|
||||
//Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc...
|
||||
#define BRUTE "brute"
|
||||
#define BURN "fire"
|
||||
#define TOX "tox"
|
||||
@@ -424,6 +425,12 @@ var/list/global_mutations = list() // list of hidden mutation things
|
||||
#define EYE_BLUR "eye_blur"
|
||||
#define DROWSY "drowsy"
|
||||
|
||||
//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches
|
||||
#define BRUTELOSS 1
|
||||
#define FIRELOSS 2
|
||||
#define TOXLOSS 4
|
||||
#define OXYLOSS 8
|
||||
|
||||
//Bitflags defining which status effects could be or are inflicted on a mob
|
||||
#define CANSTUN 1
|
||||
#define CANWEAKEN 2
|
||||
|
||||
Reference in New Issue
Block a user