mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01: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:
@@ -61,6 +61,16 @@
|
||||
/obj/item/blob_act()
|
||||
return
|
||||
|
||||
//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
|
||||
//This proc will return an array. The first element of the list should always be the suicide message that players will see, next is the damagetype
|
||||
/obj/item/proc/suicide_act(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/verb/move_to_top()
|
||||
set name = "Move To Top"
|
||||
set category = "Object"
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
* Toy crossbow
|
||||
*/
|
||||
|
||||
/obj/item/toy/crossbow
|
||||
/obj/item/toy/crossbow
|
||||
name = "foam dart crossbow"
|
||||
desc = "A weapon favored by many overactive children. Ages 8 and up."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
@@ -368,6 +368,10 @@
|
||||
var/instant = 0
|
||||
var/colourName = "red" //for updateIcon purposes
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is jaming the [src] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|OXYLOSS)
|
||||
|
||||
/*
|
||||
* Snap pops
|
||||
*/
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You accidentally cut yourself with the [src]."
|
||||
@@ -107,6 +113,12 @@
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchenknife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/obj/item/weapon/melee/energy
|
||||
var/active = 0
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>", \
|
||||
"\red <b>[user] is falling on the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/melee/energy/axe
|
||||
name = "energy axe"
|
||||
desc = "An energised battle axe."
|
||||
@@ -14,6 +19,10 @@
|
||||
origin_tech = "combat=3"
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] swings the [src] towards /his head! It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/melee/energy/sword
|
||||
color
|
||||
name = "energy sword"
|
||||
|
||||
@@ -9,4 +9,8 @@
|
||||
throwforce = 7
|
||||
w_class = 3
|
||||
origin_tech = "combat=4"
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is strangling \himself with the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (OXYLOSS)
|
||||
@@ -21,6 +21,10 @@
|
||||
var/construction_cost = list("metal"=750,"glass"=75)
|
||||
var/construction_time=100
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is licking the electrodes of the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weapon/cell/crap
|
||||
name = "\improper Nanotrasen brand rechargable AA battery"
|
||||
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
var/status = 0
|
||||
origin_tech = "combat=2"
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is putting the live [src] in \his mouth! It looks like \he's trying to commit suicide.</b>"
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
|
||||
@@ -294,7 +294,10 @@
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("drilled")
|
||||
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("/red <b>[user] is pressing the [src] to \his temple and activating it! It looks like \he's trying to commit suicide.</b>", \
|
||||
"/red <b>[user] is pressing [src] to \his chest and activating it! It looks like \he's trying to commit suicide.</b>")
|
||||
return (BRUTELOSS)
|
||||
/*
|
||||
* Scalpel
|
||||
*/
|
||||
@@ -314,6 +317,12 @@
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
m_amt = 75
|
||||
attack_verb = list("stabbed")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is stabbing the [src] into \his temple! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is stabbing the [src] into \his heart! It looks like \he's trying to commit suicide.</b>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/screwdriver/New()
|
||||
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
|
||||
if ("red")
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
var/mode = 1 //0 = pick one at a time, 1 = pick all on tile
|
||||
var/capacity = 25 //the amount of trash it can carry.
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "/red <b>[user] has put the [src] over \his head and is starting to hyperventilate! It looks like \he's trying to commit suicide.</b>"
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/weapon/trashbag/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "trashbag0"
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
throw_range = 15
|
||||
attack_verb = list("banned")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is hitting \himself with the [src]! It looks like \he's trying to ban \himself from life.</b>"
|
||||
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
||||
|
||||
/obj/item/weapon/nullrod
|
||||
name = "null rod"
|
||||
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
|
||||
@@ -24,6 +28,10 @@
|
||||
throwforce = 10
|
||||
w_class = 1
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is impaling \himself with the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/sord
|
||||
name = "\improper SORD"
|
||||
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
|
||||
@@ -36,6 +44,10 @@
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is impaling \himself with the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
@@ -55,6 +67,10 @@
|
||||
IsShield()
|
||||
return 1
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is falling on the [src]! It looks like \he's trying to commit suicide.</b>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
@@ -71,6 +87,10 @@
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is slitting \his stomach open with the [src]! It looks like \he's trying to commit seppuku.</b>"
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/katana/IsShield()
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user