mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge pull request #11151 from Fox-McCloud/suicide-refactor
Suicide Refactor
This commit is contained in:
@@ -16,6 +16,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
var/inhand_y_dimension = 32
|
||||
|
||||
can_be_hit = FALSE
|
||||
suicidal_hands = TRUE
|
||||
|
||||
var/r_speed = 1.0
|
||||
var/health = null
|
||||
@@ -145,16 +146,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
/obj/item/blob_act()
|
||||
qdel(src)
|
||||
|
||||
//user: The mob that is suiciding
|
||||
//damagetype: The type of damage the item will inflict on the user
|
||||
//BRUTELOSS = 1
|
||||
//FIRELOSS = 2
|
||||
//TOXLOSS = 4
|
||||
//OXYLOSS = 8
|
||||
//Output a creative message and then return the damagetype done
|
||||
/obj/item/proc/suicide_act(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/verb/move_to_top()
|
||||
set name = "Move To Top"
|
||||
set category = null
|
||||
@@ -258,7 +249,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
add_fingerprint(user)
|
||||
if(pickup(user)) // Pickup succeeded
|
||||
user.put_in_active_hand(src)
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/attack_alien(mob/user as mob)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/toy/crayon/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (BRUTELOSS|OXYLOSS)
|
||||
return BRUTELOSS|OXYLOSS
|
||||
|
||||
/obj/item/toy/crayon/New()
|
||||
..()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/item/instrument/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/instrument/Initialize(mapload)
|
||||
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
/obj/item/toy/katana/suicide_act(mob/user)
|
||||
var/dmsg = pick("[user] tries to stab \the [src] into [user.p_their()] abdomen, but it shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to stab \the [src] into [user.p_their()] abdomen, but \the [src] bends and breaks in half! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to slice [user.p_their()] own throat, but the plastic blade has no sharpness, causing [user.p_them()] to lose [user.p_their()] balance, slip over, and break [user.p_their()] neck with a loud snap!")
|
||||
user.visible_message("<span class='suicide'>[dmsg] It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
|
||||
/*
|
||||
@@ -1377,7 +1377,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
/obj/item/toy/russian_revolver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] quickly loads six bullets into [src]'s cylinder and points it at [user.p_their()] head before pulling the trigger! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/weapons/gunshots/gunshot_strong.ogg', 50, 1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/toy/russian_revolver/New()
|
||||
spin_cylinder()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/obj/item/gavelhammer/suicide_act(mob/user)
|
||||
user.visible_message("<span class='warning'>[user] has sentenced [user.p_them()]self to death with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/gavelblock
|
||||
name = "gavel block"
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
defib.deductcharge(revivecost)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/twohanded/shockpaddles/dropped(mob/user as mob)
|
||||
if(user)
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
sleep(10)
|
||||
prime()
|
||||
user.gib()
|
||||
return OBLITERATION
|
||||
|
||||
/obj/item/grenade/plastic/update_icon()
|
||||
if(nadeassembly)
|
||||
|
||||
@@ -168,4 +168,4 @@
|
||||
/obj/item/twohanded/garrote/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping the [src] around [user.p_their()] neck and pulling the handles! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
|
||||
return (OXYLOSS)
|
||||
return OXYLOSS
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/item/nullrod/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is killing [user.p_them()]self with \the [src.name]! It looks like [user.p_theyre()] trying to get closer to god!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
return BRUTELOSS|FIRELOSS
|
||||
|
||||
/obj/item/nullrod/attack(mob/M, mob/living/carbon/user)
|
||||
..()
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/kitchen/knife/plastic
|
||||
name = "plastic knife"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is sticking [user.p_their()] head in the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/obj/item/melee/energy/suicide_act(mob/user)
|
||||
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>", \
|
||||
"<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>"))
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
return BRUTELOSS|FIRELOSS
|
||||
|
||||
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/obj/item/melee/energy/axe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] swings the [name] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
return BRUTELOSS|FIRELOSS
|
||||
|
||||
/obj/item/melee/energy/sword
|
||||
name = "energy sword"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
|
||||
/obj/item/melee/chainofcommand/suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (OXYLOSS)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/melee/rapier
|
||||
name = "captain's rapier"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/obj/item/shard/suicide_act(mob/user)
|
||||
to_chat(viewers(user), pick("<span class='danger'>[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>",
|
||||
"<span class='danger'>[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>"))
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/shard/New()
|
||||
..()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/obj/item/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts the [name] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
var/mob/affecting = null
|
||||
var/deity_name = "Christ"
|
||||
|
||||
suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='warning'><b>[user] stares into [src.name] and attempts to trascend understanding of the universe!</b></span>")
|
||||
return (user.dust())
|
||||
/obj/item/storage/bible/suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='warning'><b>[user] stares into [src.name] and attempts to transcend understanding of the universe!</b></span>")
|
||||
user.dust()
|
||||
return OBLITERATION
|
||||
|
||||
|
||||
/obj/item/storage/bible/booze
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/melee/baton/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return (FIRELOSS)
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/melee/baton/New()
|
||||
..()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
@@ -113,7 +113,7 @@
|
||||
return
|
||||
|
||||
user.dust()
|
||||
return OXYLOSS
|
||||
return OBLITERATION
|
||||
|
||||
//Screwdriver
|
||||
/obj/item/screwdriver
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/New(loc, var/param_color = null)
|
||||
..()
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
|
||||
@@ -256,7 +256,7 @@
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
@@ -299,7 +299,7 @@
|
||||
if(head)
|
||||
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
overlays.Cut()
|
||||
@@ -738,7 +738,7 @@ obj/item/weldingtool/experimental/process()
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
|
||||
@@ -797,7 +797,7 @@
|
||||
|
||||
/obj/item/twohanded/pitchfork/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] impales \himself in \his abdomen with [src]! It looks like \he's trying to commit suicide...</span>")
|
||||
return (BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/twohanded/pitchfork/demonic/pickup(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
|
||||
/obj/item/banhammer/suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.</span>")
|
||||
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.</span>")
|
||||
return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS
|
||||
|
||||
/obj/item/sord
|
||||
name = "\improper SORD"
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/obj/item/claymore/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return(BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/claymore/ceremonial
|
||||
name = "ceremonial claymore"
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
/obj/item/katana/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.</span>")
|
||||
return(BRUTELOSS)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/harpoon
|
||||
name = "harpoon"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
|
||||
var/force_blueprints = FALSE //forces the obj to be on the blueprints, regardless of when it was created.
|
||||
var/suicidal_hands = FALSE // Does it requires you to hold it to commit suicide with it?
|
||||
|
||||
/obj/New()
|
||||
..()
|
||||
@@ -76,6 +77,19 @@
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
//user: The mob that is suiciding
|
||||
//damagetype: The type of damage the item will inflict on the user
|
||||
//BRUTELOSS = 1
|
||||
//FIRELOSS = 2
|
||||
//TOXLOSS = 4
|
||||
//OXYLOSS = 8
|
||||
//SHAME = 16
|
||||
//OBLITERATION = 32
|
||||
|
||||
//Output a creative message and then return the damagetype done
|
||||
/obj/proc/suicide_act(mob/user)
|
||||
return FALSE
|
||||
|
||||
/obj/assume_air(datum/gas_mixture/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
|
||||
Reference in New Issue
Block a user