File diff suppressed because it is too large
Load Diff
@@ -78,7 +78,7 @@ obj/item/weapon/construction
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/construction/proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/construction/attack_self(mob/user)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
|
||||
@@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
/obj/item/weapon/pipe_dispenser/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] points the end of the RPD down [user.p_their()] throat and presses a button! It looks like [user.p_theyre()] trying to commit suicide...</span>")
|
||||
playsound(get_turf(user), 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(get_turf(user), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
|
||||
@@ -594,7 +594,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
|
||||
|
||||
/obj/item/weapon/pipe_dispenser/proc/activate()
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
#undef PIPE_BINARY
|
||||
#undef PIPE_BENT
|
||||
|
||||
@@ -1,319 +1,319 @@
|
||||
/* Cards
|
||||
* Contains:
|
||||
* DATA CARD
|
||||
* ID CARD
|
||||
* FINGERPRINT CARD HOLDER
|
||||
* FINGERPRINT CARD
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* DATA CARDS - Used for the teleporter
|
||||
*/
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/list/files = list()
|
||||
|
||||
/obj/item/weapon/card/data
|
||||
name = "data disk"
|
||||
desc = "A disk of data."
|
||||
icon_state = "data"
|
||||
var/function = "storage"
|
||||
var/data = "null"
|
||||
var/special = null
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/card/data/verb/label(t as text)
|
||||
set name = "Label Disk"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if (t)
|
||||
src.name = "data disk- '[t]'"
|
||||
else
|
||||
src.name = "data disk"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
* ID CARDS
|
||||
*/
|
||||
/obj/item/weapon/card/emag
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
flags = NOBLUDGEON
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
|
||||
/obj/item/weapon/card/emag/bluespace
|
||||
name = "bluespace cryptographic sequencer"
|
||||
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
|
||||
color = rgb(40, 130, 255)
|
||||
origin_tech = "bluespace=4;magnets=4;syndicate=5"
|
||||
prox_check = FALSE
|
||||
|
||||
/obj/item/weapon/card/emag/attack()
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
|
||||
var/atom/A = target
|
||||
if(!proximity && prox_check)
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
icon_state = "id"
|
||||
item_state = "card-id"
|
||||
slot_flags = SLOT_ID
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/mining_points = 0 //For redeeming at mining equipment vendors
|
||||
var/list/access = list()
|
||||
var/registered_name = null // The name registered_name on the card
|
||||
var/assignment = null
|
||||
var/access_txt // mapping aid
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload && access_txt)
|
||||
access = text2access(access_txt)
|
||||
|
||||
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
update_label()
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [bicon(src)] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
..()
|
||||
if(mining_points)
|
||||
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.")
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/*
|
||||
Usage:
|
||||
update_label()
|
||||
Sets the id name to whatever registered_name and assignment is
|
||||
|
||||
update_label("John Doe", "Clowny")
|
||||
Properly formats the name and occupation and sets the id name to the arguments
|
||||
*/
|
||||
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
|
||||
if(newname || newjob)
|
||||
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
|
||||
return
|
||||
|
||||
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
|
||||
|
||||
/obj/item/weapon/card/id/silver
|
||||
name = "silver identification card"
|
||||
desc = "A silver card which shows honour and dedication."
|
||||
icon_state = "silver"
|
||||
item_state = "silver_id"
|
||||
|
||||
/obj/item/weapon/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(GLOB.access_maint_tunnels, GLOB.access_syndicate)
|
||||
origin_tech = "syndicate=1"
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/Initialize()
|
||||
..()
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/weapon/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(obj/item/weapon/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = O
|
||||
src.access |= I.access
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role)
|
||||
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role || anyone)
|
||||
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (t)
|
||||
alert("Invalid name.")
|
||||
return
|
||||
registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
registered_name = ""
|
||||
return
|
||||
assignment = u
|
||||
update_label()
|
||||
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/anyone
|
||||
anyone = TRUE
|
||||
|
||||
/obj/item/weapon/card/id/syndicate_command
|
||||
name = "syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(GLOB.access_syndicate)
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "captain's spare ID"
|
||||
desc = "The spare ID of the High Lord himself."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare/Initialize()
|
||||
var/datum/job/captain/J = new/datum/job/captain
|
||||
access = J.get_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "\improper Centcom ID"
|
||||
desc = "An ID straight from Cent. Com."
|
||||
icon_state = "centcom"
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
|
||||
/obj/item/weapon/card/id/centcom/Initialize()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert
|
||||
name = "\improper Centcom ID"
|
||||
desc = "A ERT ID card"
|
||||
icon_state = "centcom"
|
||||
registered_name = "Emergency Response Team Commander"
|
||||
assignment = "Emergency Response Team Commander"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("commander")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security
|
||||
registered_name = "Security Response Officer"
|
||||
assignment = "Security Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("sec")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer
|
||||
registered_name = "Engineer Response Officer"
|
||||
assignment = "Engineer Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("eng")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical
|
||||
registered_name = "Medical Response Officer"
|
||||
assignment = "Medical Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("med")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/prisoner
|
||||
name = "prisoner ID card"
|
||||
desc = "You are a number, you are not a free man."
|
||||
icon_state = "orange"
|
||||
item_state = "orange-id"
|
||||
assignment = "Prisoner"
|
||||
registered_name = "Scum"
|
||||
var/goal = 0 //How far from freedom?
|
||||
var/points = 0
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
|
||||
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/one
|
||||
name = "Prisoner #13-001"
|
||||
registered_name = "Prisoner #13-001"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/two
|
||||
name = "Prisoner #13-002"
|
||||
registered_name = "Prisoner #13-002"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/three
|
||||
name = "Prisoner #13-003"
|
||||
registered_name = "Prisoner #13-003"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/four
|
||||
name = "Prisoner #13-004"
|
||||
registered_name = "Prisoner #13-004"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/five
|
||||
name = "Prisoner #13-005"
|
||||
registered_name = "Prisoner #13-005"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/six
|
||||
name = "Prisoner #13-006"
|
||||
registered_name = "Prisoner #13-006"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/seven
|
||||
name = "Prisoner #13-007"
|
||||
registered_name = "Prisoner #13-007"
|
||||
|
||||
/obj/item/weapon/card/id/mining
|
||||
name = "mining ID"
|
||||
access = list(GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
|
||||
|
||||
/obj/item/weapon/card/id/away
|
||||
name = "a perfectly generic identification card"
|
||||
desc = "A perfectly generic identification card. Looks like it could use some flavor."
|
||||
access = list(GLOB.access_away_general)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel
|
||||
name = "Staff ID"
|
||||
desc = "A staff ID used to access the hotel's doors."
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel/securty
|
||||
name = "Officer ID"
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint, GLOB.access_away_sec)
|
||||
/* Cards
|
||||
* Contains:
|
||||
* DATA CARD
|
||||
* ID CARD
|
||||
* FINGERPRINT CARD HOLDER
|
||||
* FINGERPRINT CARD
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* DATA CARDS - Used for the teleporter
|
||||
*/
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/list/files = list()
|
||||
|
||||
/obj/item/weapon/card/data
|
||||
name = "data disk"
|
||||
desc = "A disk of data."
|
||||
icon_state = "data"
|
||||
var/function = "storage"
|
||||
var/data = "null"
|
||||
var/special = null
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/card/data/verb/label(t as text)
|
||||
set name = "Label Disk"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if (t)
|
||||
src.name = "data disk- '[t]'"
|
||||
else
|
||||
src.name = "data disk"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/*
|
||||
* ID CARDS
|
||||
*/
|
||||
/obj/item/weapon/card/emag
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
origin_tech = "magnets=2;syndicate=2"
|
||||
flags = NOBLUDGEON
|
||||
var/prox_check = TRUE //If the emag requires you to be in range
|
||||
|
||||
/obj/item/weapon/card/emag/bluespace
|
||||
name = "bluespace cryptographic sequencer"
|
||||
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
|
||||
color = rgb(40, 130, 255)
|
||||
origin_tech = "bluespace=4;magnets=4;syndicate=5"
|
||||
prox_check = FALSE
|
||||
|
||||
/obj/item/weapon/card/emag/attack()
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
|
||||
var/atom/A = target
|
||||
if(!proximity && prox_check)
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/weapon/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
icon_state = "id"
|
||||
item_state = "card-id"
|
||||
slot_flags = SLOT_ID
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/mining_points = 0 //For redeeming at mining equipment vendors
|
||||
var/list/access = list()
|
||||
var/registered_name = null // The name registered_name on the card
|
||||
var/assignment = null
|
||||
var/access_txt // mapping aid
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload && access_txt)
|
||||
access = text2access(access_txt)
|
||||
|
||||
/obj/item/weapon/card/id/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
update_label()
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [bicon(src)] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
..()
|
||||
if(mining_points)
|
||||
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.")
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
/*
|
||||
Usage:
|
||||
update_label()
|
||||
Sets the id name to whatever registered_name and assignment is
|
||||
|
||||
update_label("John Doe", "Clowny")
|
||||
Properly formats the name and occupation and sets the id name to the arguments
|
||||
*/
|
||||
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
|
||||
if(newname || newjob)
|
||||
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
|
||||
return
|
||||
|
||||
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
|
||||
|
||||
/obj/item/weapon/card/id/silver
|
||||
name = "silver identification card"
|
||||
desc = "A silver card which shows honour and dedication."
|
||||
icon_state = "silver"
|
||||
item_state = "silver_id"
|
||||
|
||||
/obj/item/weapon/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
|
||||
/obj/item/weapon/card/id/syndicate
|
||||
name = "agent card"
|
||||
access = list(GLOB.access_maint_tunnels, GLOB.access_syndicate)
|
||||
origin_tech = "syndicate=1"
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/Initialize()
|
||||
..()
|
||||
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
|
||||
chameleon_action.chameleon_type = /obj/item/weapon/card/id
|
||||
chameleon_action.chameleon_name = "ID Card"
|
||||
chameleon_action.initialize_disguises()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(obj/item/weapon/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = O
|
||||
src.access |= I.access
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role)
|
||||
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role || anyone)
|
||||
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (t)
|
||||
alert("Invalid name.")
|
||||
return
|
||||
registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
registered_name = ""
|
||||
return
|
||||
assignment = u
|
||||
update_label()
|
||||
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/anyone
|
||||
anyone = TRUE
|
||||
|
||||
/obj/item/weapon/card/id/syndicate_command
|
||||
name = "syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
registered_name = "Syndicate"
|
||||
assignment = "Syndicate Overlord"
|
||||
access = list(GLOB.access_syndicate)
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare
|
||||
name = "captain's spare ID"
|
||||
desc = "The spare ID of the High Lord himself."
|
||||
icon_state = "gold"
|
||||
item_state = "gold_id"
|
||||
registered_name = "Captain"
|
||||
assignment = "Captain"
|
||||
|
||||
/obj/item/weapon/card/id/captains_spare/Initialize()
|
||||
var/datum/job/captain/J = new/datum/job/captain
|
||||
access = J.get_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom
|
||||
name = "\improper Centcom ID"
|
||||
desc = "An ID straight from Cent. Com."
|
||||
icon_state = "centcom"
|
||||
registered_name = "Central Command"
|
||||
assignment = "General"
|
||||
|
||||
/obj/item/weapon/card/id/centcom/Initialize()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert
|
||||
name = "\improper Centcom ID"
|
||||
desc = "A ERT ID card"
|
||||
icon_state = "centcom"
|
||||
registered_name = "Emergency Response Team Commander"
|
||||
assignment = "Emergency Response Team Commander"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("commander")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security
|
||||
registered_name = "Security Response Officer"
|
||||
assignment = "Security Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Security/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("sec")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer
|
||||
registered_name = "Engineer Response Officer"
|
||||
assignment = "Engineer Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Engineer/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("eng")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical
|
||||
registered_name = "Medical Response Officer"
|
||||
assignment = "Medical Response Officer"
|
||||
|
||||
/obj/item/weapon/card/id/ert/Medical/Initialize()
|
||||
access = get_all_accesses()+get_ert_access("med")-GLOB.access_change_ids
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/prisoner
|
||||
name = "prisoner ID card"
|
||||
desc = "You are a number, you are not a free man."
|
||||
icon_state = "orange"
|
||||
item_state = "orange-id"
|
||||
assignment = "Prisoner"
|
||||
registered_name = "Scum"
|
||||
var/goal = 0 //How far from freedom?
|
||||
var/points = 0
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
|
||||
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/one
|
||||
name = "Prisoner #13-001"
|
||||
registered_name = "Prisoner #13-001"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/two
|
||||
name = "Prisoner #13-002"
|
||||
registered_name = "Prisoner #13-002"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/three
|
||||
name = "Prisoner #13-003"
|
||||
registered_name = "Prisoner #13-003"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/four
|
||||
name = "Prisoner #13-004"
|
||||
registered_name = "Prisoner #13-004"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/five
|
||||
name = "Prisoner #13-005"
|
||||
registered_name = "Prisoner #13-005"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/six
|
||||
name = "Prisoner #13-006"
|
||||
registered_name = "Prisoner #13-006"
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/seven
|
||||
name = "Prisoner #13-007"
|
||||
registered_name = "Prisoner #13-007"
|
||||
|
||||
/obj/item/weapon/card/id/mining
|
||||
name = "mining ID"
|
||||
access = list(GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
|
||||
|
||||
/obj/item/weapon/card/id/away
|
||||
name = "a perfectly generic identification card"
|
||||
desc = "A perfectly generic identification card. Looks like it could use some flavor."
|
||||
access = list(GLOB.access_away_general)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel
|
||||
name = "Staff ID"
|
||||
desc = "A staff ID used to access the hotel's doors."
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint)
|
||||
|
||||
/obj/item/weapon/card/id/away/hotel/securty
|
||||
name = "Officer ID"
|
||||
access = list(GLOB.access_away_general, GLOB.access_away_maint, GLOB.access_away_sec)
|
||||
|
||||
/obj/item/weapon/card/id/away/old
|
||||
name = "a perfectly generic identification card"
|
||||
|
||||
@@ -16,22 +16,16 @@
|
||||
|
||||
var/static/regex/standard_station_regex
|
||||
|
||||
/obj/item/weapon/station_charter/New()
|
||||
/obj/item/weapon/station_charter/Initialize()
|
||||
. = ..()
|
||||
if(!standard_station_regex)
|
||||
var/prefixes = jointext(GLOB.station_prefixes, "|")
|
||||
var/names = jointext(GLOB.station_names, "|")
|
||||
var/suffixes = jointext(GLOB.station_suffixes, "|")
|
||||
var/numerals = jointext(GLOB.station_numerals, "|")
|
||||
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
|
||||
var/regexstr = "^(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])$"
|
||||
standard_station_regex = new(regexstr)
|
||||
|
||||
/obj/item/weapon/station_charter/Destroy()
|
||||
if(response_timer_id)
|
||||
deltimer(response_timer_id)
|
||||
response_timer_id = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/station_charter/attack_self(mob/living/user)
|
||||
if(used)
|
||||
to_chat(user, "The [name_type] has already been named.")
|
||||
@@ -48,6 +42,10 @@
|
||||
rejected by your employers, while names using the standard format, \
|
||||
will automatically be accepted.", max_length=MAX_CHARTER_LEN)
|
||||
|
||||
if(response_timer_id)
|
||||
to_chat(user, "You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now.")
|
||||
return
|
||||
|
||||
if(!new_name)
|
||||
return
|
||||
log_game("[key_name(user)] has proposed to name the station as \
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
qdel(captured)
|
||||
qdel(src)
|
||||
else
|
||||
captured.Paralyse(4)
|
||||
captured.Unconscious(80)
|
||||
if(captured.loc != src)
|
||||
captured.loc = src
|
||||
update_icon()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,170 +1,170 @@
|
||||
/* Clown Items
|
||||
* Contains:
|
||||
* Soap
|
||||
* Bike Horns
|
||||
* Air Horns
|
||||
*/
|
||||
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
|
||||
/obj/item/weapon/soap
|
||||
name = "soap"
|
||||
desc = "A cheap bar of soap. Doesn't smell."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
flags = NOBLUDGEON
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
/* Clown Items
|
||||
* Contains:
|
||||
* Soap
|
||||
* Bike Horns
|
||||
* Air Horns
|
||||
*/
|
||||
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
|
||||
/obj/item/weapon/soap
|
||||
name = "soap"
|
||||
desc = "A cheap bar of soap. Doesn't smell."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
flags = NOBLUDGEON
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
force_string = "robust... against germs"
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
icon_state = "soapnt"
|
||||
|
||||
/obj/item/weapon/soap/homemade
|
||||
desc = "A homemade bar of soap. Smells of... well...."
|
||||
icon_state = "soapgibs"
|
||||
cleanspeed = 45 // a little faster to reward chemists for going to the effort
|
||||
|
||||
/obj/item/weapon/soap/deluxe
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
|
||||
icon_state = "soapdeluxe"
|
||||
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
|
||||
|
||||
/obj/item/weapon/soap/syndie
|
||||
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
|
||||
icon_state = "soapsyndie"
|
||||
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
|
||||
|
||||
/obj/item/weapon/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(4, 2, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
to_chat(user, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
|
||||
H.lip_style = null //removes lipstick
|
||||
H.update_body()
|
||||
return
|
||||
else if(istype(target, /obj/structure/window))
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.set_opacity(initial(target.opacity))
|
||||
else
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.clean_blood()
|
||||
target.wash_cream()
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn
|
||||
name = "bike horn"
|
||||
desc = "A horn off of a bicycle."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "bike_horn"
|
||||
item_state = "bike_horn"
|
||||
throwforce = 0
|
||||
hitsound = null //To prevent tap.ogg playing, as the item lacks of force
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
attack_verb = list("HONKED")
|
||||
|
||||
/obj/item/weapon/soap/nanotrasen
|
||||
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
|
||||
icon_state = "soapnt"
|
||||
|
||||
/obj/item/weapon/soap/homemade
|
||||
desc = "A homemade bar of soap. Smells of... well...."
|
||||
icon_state = "soapgibs"
|
||||
cleanspeed = 45 // a little faster to reward chemists for going to the effort
|
||||
|
||||
/obj/item/weapon/soap/deluxe
|
||||
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
|
||||
icon_state = "soapdeluxe"
|
||||
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
|
||||
|
||||
/obj/item/weapon/soap/syndie
|
||||
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
|
||||
icon_state = "soapsyndie"
|
||||
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
|
||||
|
||||
/obj/item/weapon/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(80, src)
|
||||
|
||||
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
to_chat(user, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
|
||||
H.lip_style = null //removes lipstick
|
||||
H.update_body()
|
||||
return
|
||||
else if(istype(target, /obj/structure/window))
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.set_opacity(initial(target.opacity))
|
||||
else
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.clean_blood()
|
||||
target.wash_cream()
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn
|
||||
name = "bike horn"
|
||||
desc = "A horn off of a bicycle."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "bike_horn"
|
||||
item_state = "bike_horn"
|
||||
throwforce = 0
|
||||
hitsound = null //To prevent tap.ogg playing, as the item lacks of force
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
attack_verb = list("HONKED")
|
||||
var/next_usable = 0
|
||||
var/honksound = 'sound/items/bikehorn.ogg'
|
||||
var/cooldowntime = 20
|
||||
|
||||
/obj/item/weapon/bikehorn/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
var/honksound = 'sound/items/bikehorn.ogg'
|
||||
var/cooldowntime = 20
|
||||
|
||||
/obj/item/weapon/bikehorn/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!(next_usable > world.time))
|
||||
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/attack_self(mob/user)
|
||||
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/attack_self(mob/user)
|
||||
if(!(next_usable > world.time))
|
||||
next_usable = world.time + cooldowntime
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/bikehorn/Crossed(mob/living/L)
|
||||
if(isliving(L))
|
||||
playsound(loc, honksound, 50, 1, -1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/airhorn
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honksound = 'sound/items/AirHorn2.ogg'
|
||||
cooldowntime = 50
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden
|
||||
name = "golden bike horn"
|
||||
desc = "Golden? Clearly, it's made with bananium! Honk!"
|
||||
icon_state = "gold_horn"
|
||||
item_state = "gold_horn"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack()
|
||||
flip_mobs()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
|
||||
flip_mobs()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
|
||||
playsound(src.loc, honksound, 50, 1)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/bikehorn/Crossed(mob/living/L)
|
||||
if(isliving(L))
|
||||
playsound(loc, honksound, 50, 1, -1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/airhorn
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
icon_state = "air_horn"
|
||||
honksound = 'sound/items/airhorn2.ogg'
|
||||
cooldowntime = 50
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden
|
||||
name = "golden bike horn"
|
||||
desc = "Golden? Clearly, it's made with bananium! Honk!"
|
||||
icon_state = "gold_horn"
|
||||
item_state = "gold_horn"
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack()
|
||||
flip_mobs()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
|
||||
flip_mobs()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
|
||||
if(!(next_usable > world.time))
|
||||
var/turf/T = get_turf(src)
|
||||
for(M in ohearers(7, T))
|
||||
var/turf/T = get_turf(src)
|
||||
for(M in ohearers(7, T))
|
||||
if(ishuman(M) && M.can_hear())
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
M.emote("flip")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter
|
||||
name = "Canned Laughter"
|
||||
desc = "Just looking at this makes you want to giggle."
|
||||
icon_state = "laughter"
|
||||
list_reagents = list("laughter" = 50)
|
||||
continue
|
||||
M.emote("flip")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/canned_laughter
|
||||
name = "Canned Laughter"
|
||||
desc = "Just looking at this makes you want to giggle."
|
||||
icon_state = "laughter"
|
||||
list_reagents = list("laughter" = 50)
|
||||
|
||||
@@ -1,186 +1,186 @@
|
||||
/obj/item/weapon/lipstick
|
||||
gender = PLURAL
|
||||
name = "red lipstick"
|
||||
desc = "A generic brand of lipstick."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
|
||||
/obj/item/weapon/lipstick/jade
|
||||
//It's still called Jade, but theres no HTML color for jade, so we use lime.
|
||||
name = "jade lipstick"
|
||||
colour = "lime"
|
||||
|
||||
/obj/item/weapon/lipstick/black
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/random/New()
|
||||
..()
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
/obj/item/weapon/lipstick
|
||||
gender = PLURAL
|
||||
name = "red lipstick"
|
||||
desc = "A generic brand of lipstick."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lipstick"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
|
||||
/obj/item/weapon/lipstick/jade
|
||||
//It's still called Jade, but theres no HTML color for jade, so we use lime.
|
||||
name = "jade lipstick"
|
||||
colour = "lime"
|
||||
|
||||
/obj/item/weapon/lipstick/black
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/random/New()
|
||||
..()
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
var/mutable_appearance/colored_overlay = mutable_appearance(icon, "lipstick_uncap_color")
|
||||
colored_overlay.color = colour
|
||||
icon_state = "lipstick_uncap"
|
||||
icon_state = "lipstick_uncap"
|
||||
add_overlay(colored_overlay)
|
||||
else
|
||||
icon_state = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_mouth_covered())
|
||||
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
|
||||
return
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
|
||||
if(do_after(user, 20, target = H))
|
||||
user.visible_message("[user] does [H]'s lips with \the [src].", \
|
||||
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/weapon/paper/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H == user)
|
||||
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
|
||||
if(do_after(user, 10, target = H))
|
||||
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
|
||||
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "razor"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
else
|
||||
H.hair_style = "Skinhead"
|
||||
|
||||
H.update_hair()
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/location = user.zone_selected
|
||||
if(location == "mouth")
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
||||
return
|
||||
if(H.facial_hair_style == "Shaved")
|
||||
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their facial hair with [src].", \
|
||||
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
user.visible_message("[user] shaves his facial hair clean with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, location)
|
||||
|
||||
else if(location == "head")
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
||||
return
|
||||
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their head with [src].", \
|
||||
"<span class='notice'>You start to shave your head with [src]...</span>")
|
||||
if(do_after(user, 5, target = H))
|
||||
user.visible_message("[user] shaves his head with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src].</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s head...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
|
||||
"<span class='notice'>You shave [H]'s head bald.</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
..()
|
||||
else
|
||||
else
|
||||
icon_state = "lipstick"
|
||||
|
||||
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
|
||||
if(!open)
|
||||
return
|
||||
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_mouth_covered())
|
||||
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
|
||||
return
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
|
||||
if(do_after(user, 20, target = H))
|
||||
user.visible_message("[user] does [H]'s lips with \the [src].", \
|
||||
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/weapon/paper/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H == user)
|
||||
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
|
||||
if(do_after(user, 10, target = H))
|
||||
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
|
||||
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "razor"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
else
|
||||
H.hair_style = "Skinhead"
|
||||
|
||||
H.update_hair()
|
||||
playsound(loc, 'sound/items/welder2.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/location = user.zone_selected
|
||||
if(location == "mouth")
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
||||
return
|
||||
if(H.facial_hair_style == "Shaved")
|
||||
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their facial hair with [src].", \
|
||||
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
user.visible_message("[user] shaves his facial hair clean with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, location)
|
||||
|
||||
else if(location == "head")
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
||||
return
|
||||
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("[user] starts to shave their head with [src].", \
|
||||
"<span class='notice'>You start to shave your head with [src]...</span>")
|
||||
if(do_after(user, 5, target = H))
|
||||
user.visible_message("[user] shaves his head with [src].", \
|
||||
"<span class='notice'>You finish shaving with [src].</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
var/turf/H_loc = H.loc
|
||||
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s head...</span>")
|
||||
if(do_after(user, 50, target = H))
|
||||
if(H_loc == H.loc)
|
||||
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
|
||||
"<span class='notice'>You shave [H]'s head bald.</span>")
|
||||
shave(H, location)
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
@@ -23,15 +23,15 @@
|
||||
var/combat = 0 //can we revive through space suits?
|
||||
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
|
||||
|
||||
/obj/item/weapon/defibrillator/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/defibrillator/Initialize() //starts without a cell for rnd
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/defibrillator/loaded/Initialize() //starts with hicap
|
||||
. = ..()
|
||||
paddles = make_paddles()
|
||||
@@ -123,7 +123,7 @@
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.loc = get_turf(src.loc)
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
update_icon()
|
||||
@@ -400,7 +400,7 @@
|
||||
M.visible_message("<span class='danger'>[user] has touched [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has touched [M] with [src]!</span>")
|
||||
M.adjustStaminaLoss(50)
|
||||
M.Weaken(5)
|
||||
M.Knockdown(100)
|
||||
M.updatehealth() //forces health update before next life tick
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
M.emote("gasp")
|
||||
@@ -446,7 +446,7 @@
|
||||
return
|
||||
user.visible_message("<span class='boldannounce'><i>[user] shocks [H] with \the [src]!</span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 100, 1, -1)
|
||||
H.emote("scream")
|
||||
if(H.can_heartattack() && !H.undergoing_cardiac_arrest())
|
||||
if(!H.stat)
|
||||
@@ -455,7 +455,7 @@
|
||||
H.set_heartattack(TRUE)
|
||||
H.apply_damage(50, BURN, "chest")
|
||||
add_logs(user, H, "overloaded the heart of", defib)
|
||||
H.Weaken(5)
|
||||
H.Knockdown(100)
|
||||
H.Jitter(100)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
return 0
|
||||
to_chat(H, "<span class='userdanger'>You step on the D4!</span>")
|
||||
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
|
||||
H.Weaken(3)
|
||||
H.Knockdown(60)
|
||||
|
||||
/obj/item/weapon/dice/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -1,368 +1,368 @@
|
||||
/obj/item/weapon/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "dnainjector"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
/obj/item/weapon/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "dnainjector"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/weapon/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/weapon/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/weapon/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/weapon/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/weapon/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/weapon/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/weapon/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/weapon/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/weapon/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/weapon/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/weapon/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/weapon/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/weapon/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/weapon/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
@@ -232,8 +232,8 @@
|
||||
/obj/item/weapon/flamethrower/full/tank
|
||||
create_with_tank = TRUE
|
||||
|
||||
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM)
|
||||
var/obj/item/projectile/P = AM
|
||||
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
|
||||
var/target_turf = get_turf(owner)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,13 +27,11 @@
|
||||
|
||||
//Flash
|
||||
if(M.flash_act(affect_silicon = 1))
|
||||
M.Stun(max(10/max(1,distance), 3))
|
||||
M.Weaken(max(10/max(1,distance), 3))
|
||||
M.Knockdown(max(100/max(1,distance), 3))
|
||||
//Bang
|
||||
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
|
||||
M.Stun(10)
|
||||
M.Weaken(10)
|
||||
M.soundbang_act(1, 10, 10, 15)
|
||||
M.Knockdown(200)
|
||||
M.soundbang_act(1, 200, 10, 15)
|
||||
|
||||
else
|
||||
M.soundbang_act(1, max(10/max(1,distance), 3), rand(0, 5))
|
||||
M.soundbang_act(1, max(20/max(1,distance), 3), rand(0, 5))
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
var/list/times
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/Initialize()
|
||||
. = ..()
|
||||
add_overlay("improvised_grenade_filled")
|
||||
add_overlay("improvised_grenade_wired")
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
|
||||
can.pixel_y = 0
|
||||
var/mutable_appearance/can_underlay = new(can)
|
||||
can_underlay.layer = FLOAT_LAYER
|
||||
can_underlay.plane = FLOAT_PLANE
|
||||
underlays += can_underlay
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = TRUE
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
/obj/item/weapon/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/weapon/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/weapon/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
|
||||
/obj/item/weapon/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type, atom/movable/AM)
|
||||
var/obj/item/projectile/P = AM
|
||||
/obj/item/weapon/grenade
|
||||
name = "grenade"
|
||||
desc = "It has an adjustable timer."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
resistance_flags = FLAMMABLE
|
||||
obj_integrity = 40
|
||||
max_integrity = 40
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
|
||||
/obj/item/weapon/grenade/deconstruct(disassembled = TRUE)
|
||||
if(!disassembled)
|
||||
prime()
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
/obj/item/weapon/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
|
||||
/obj/item/weapon/grenade/proc/update_mob()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
else
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
if(ismob(target))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
/obj/item/weapon/grenade/syndieminibomb
|
||||
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
|
||||
name = "syndicate minibomb"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "syndicate"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=3"
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/prime()
|
||||
update_mob()
|
||||
/obj/item/weapon/grenade/syndieminibomb
|
||||
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
|
||||
name = "syndicate minibomb"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "syndicate"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=3"
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/prime()
|
||||
update_mob()
|
||||
explosion(src.loc,1,2,4,flame_range = 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion
|
||||
name = "HE Grenade"
|
||||
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
|
||||
icon_state = "concussion"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=2"
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
|
||||
update_mob()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion
|
||||
name = "HE Grenade"
|
||||
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
|
||||
icon_state = "concussion"
|
||||
origin_tech = "materials=3;magnets=4;syndicate=2"
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
|
||||
update_mob()
|
||||
explosion(src.loc,0,2,3,flame_range = 3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
|
||||
name = "frag grenade"
|
||||
desc = "Fire in the hole."
|
||||
icon_state = "frag"
|
||||
|
||||
/obj/item/weapon/grenade/gluon
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
|
||||
/obj/item/weapon/grenade/gluon/prime()
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
|
||||
name = "frag grenade"
|
||||
desc = "Fire in the hole."
|
||||
icon_state = "frag"
|
||||
|
||||
/obj/item/weapon/grenade/gluon
|
||||
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
|
||||
name = "gluon frag grenade"
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "bluefrag"
|
||||
item_state = "flashbang"
|
||||
var/freeze_range = 4
|
||||
var/rad_damage = 35
|
||||
var/stamina_damage = 30
|
||||
|
||||
/obj/item/weapon/grenade/gluon/prime()
|
||||
update_mob()
|
||||
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
|
||||
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(istype(C, /mob/living/carbon/monkey) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
if(ismonkey(C) && prob(MONKEY_CUFF_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = C
|
||||
M.retaliate(user)
|
||||
@@ -303,7 +303,7 @@
|
||||
addtimer(CALLBACK(src, .proc/dissipate), 100)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!istype(loc, /mob))
|
||||
if(!ismob(loc))
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
breakouttime = 35//easy to apply, easy to break out of
|
||||
gender = NEUTER
|
||||
origin_tech = "engineering=3;combat=1"
|
||||
var/weaken = 0
|
||||
var/knockdown = 0
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
if(!..())
|
||||
@@ -338,7 +338,7 @@
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.add_details("handcuffs","[type]")
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.Weaken(weaken)
|
||||
C.Knockdown(knockdown)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/tactical//traitor variant
|
||||
name = "reinforced bola"
|
||||
@@ -346,7 +346,7 @@
|
||||
icon_state = "bola_r"
|
||||
breakouttime = 70
|
||||
origin_tech = "engineering=4;combat=3"
|
||||
weaken = 1
|
||||
knockdown = 20
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/energy //For Security
|
||||
name = "energy bola"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
master.emote("scream")
|
||||
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
||||
flags &= ~NODROP
|
||||
master.Weaken(3)
|
||||
master.Knockdown(60)
|
||||
master.adjustBruteLoss(master.maxHealth)
|
||||
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
||||
else
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
|
||||
@@ -68,18 +68,18 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implant/explosive/proc/timed_explosion()
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] starts beeping ominously!</span>")
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
if(imp_in && !imp_in.stat)
|
||||
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Weaken(7)
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Knockdown(140)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
sleep(delay/4)
|
||||
sleep(delay*0.25)
|
||||
explosion(src,heavy,medium,weak,weak, flame_range = weak)
|
||||
if(imp_in)
|
||||
imp_in.gib(1)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenal implant"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
desc = "Removes all stuns."
|
||||
icon_state = "adrenal"
|
||||
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
|
||||
uses = 3
|
||||
@@ -35,9 +35,9 @@
|
||||
/obj/item/weapon/implant/adrenalin/activate()
|
||||
uses--
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetParalysis(0)
|
||||
imp_in.SetStun(0)
|
||||
imp_in.SetKnockdown(0)
|
||||
imp_in.SetUnconscious(0)
|
||||
imp_in.adjustStaminaLoss(-75)
|
||||
imp_in.lying = 0
|
||||
imp_in.update_canmove()
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
/obj/item/weapon/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
/obj/item/weapon/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
origin_tech = initial(origin_tech)
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/weapon/implant/emp
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/weapon/implant/emp
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
|
||||
usr.set_machine(src)
|
||||
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/item/weapon/inducer/emp_act(severity)
|
||||
..()
|
||||
if(cell)
|
||||
cell.emp_act()
|
||||
cell.emp_act(severity)
|
||||
|
||||
/obj/item/weapon/inducer/attack_obj(obj/O, mob/living/carbon/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
|
||||
@@ -1,160 +1,160 @@
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
/* Kitchen tools
|
||||
* Contains:
|
||||
* Fork
|
||||
* Kitchen knives
|
||||
* Ritual Knife
|
||||
* Butcher's cleaver
|
||||
* Combat Knife
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/weapon/kitchen/fork
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=80)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(forkload)
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
|
||||
M.reagents.add_reagent(forkload.id, 1)
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
flags = CONDUCT
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
|
||||
/obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
|
||||
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 [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products."
|
||||
flags = CONDUCT
|
||||
force = 15
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
|
||||
/obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
|
||||
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 [src.name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/kitchen/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/butcher
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "butch"
|
||||
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products."
|
||||
flags = CONDUCT
|
||||
force = 15
|
||||
throwforce = 10
|
||||
materials = list(MAT_METAL=18000)
|
||||
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat
|
||||
name = "combat knife"
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
force = 20
|
||||
throwforce = 20
|
||||
origin_tech = "materials=3;combat=4"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/survival
|
||||
name = "survival knife"
|
||||
icon_state = "survivalknife"
|
||||
desc = "A hunting grade survival knife."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
bayonet = TRUE
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/weapon/storage/bag */
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/bone
|
||||
name = "bone dagger"
|
||||
item_state = "bone_dagger"
|
||||
icon_state = "bone_dagger"
|
||||
desc = "A sharpened bone. The bare mimimum in survival."
|
||||
force = 15
|
||||
throwforce = 15
|
||||
materials = list()
|
||||
|
||||
/obj/item/weapon/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/kitchen/knife/carrotshiv
|
||||
name = "carrot shiv"
|
||||
icon_state = "carrotshiv"
|
||||
item_state = "carrotshiv"
|
||||
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
|
||||
force = 8
|
||||
throwforce = 12//fuck git
|
||||
materials = list()
|
||||
origin_tech = "biotech=3;combat=2"
|
||||
attack_verb = list("shanked", "shivved")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/weapon/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
force = 8
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/* Trays moved to /obj/item/weapon/storage/bag */
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
@@ -188,7 +188,7 @@
|
||||
icon_state = "esaw_0"
|
||||
item_color = null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind their back!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(2)
|
||||
user.Stun(40)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
materials = list(MAT_METAL = 1000)
|
||||
|
||||
/obj/item/weapon/melee/sabre/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0 //Don't bring a sword to a gunfight
|
||||
return ..()
|
||||
@@ -77,14 +77,14 @@
|
||||
var/cooldown = 0
|
||||
var/on = 1
|
||||
|
||||
/obj/item/weapon/melee/classic_baton/attack(mob/target, mob/living/user)
|
||||
/obj/item/weapon/melee/classic_baton/attack(mob/living/target, mob/living/user)
|
||||
if(!on)
|
||||
return ..()
|
||||
|
||||
add_fingerprint(user)
|
||||
if((CLUMSY in user.disabilities) && prob(50))
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Weaken(3 * force)
|
||||
user.Knockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
@@ -105,12 +105,12 @@
|
||||
if(cooldown <= world.time)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if (H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK))
|
||||
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
return
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Weaken(3)
|
||||
target.Knockdown(60)
|
||||
add_logs(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/obj/item/weapon/melee/transforming //TODO: make transforming energy weapons a subtype of this
|
||||
var/active = FALSE
|
||||
var/force_on = 30 //force when active
|
||||
var/throwforce_on = 20
|
||||
var/icon_state_on = "axe1"
|
||||
var/hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/list/attack_verb_off = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/weapon/melee/transforming/Initialize()
|
||||
. = ..()
|
||||
if(active)
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
else
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
|
||||
/obj/item/weapon/melee/transforming/attack_self(mob/living/carbon/user)
|
||||
if(transform_weapon(user))
|
||||
clumsy_transform_effect(user)
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/transform_weapon(mob/living/user, supress_message_text)
|
||||
active = !active
|
||||
if(active)
|
||||
force = force_on
|
||||
throwforce = throwforce_on
|
||||
hitsound = hitsound_on
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
icon_state = icon_state_on
|
||||
w_class = w_class_on
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
hitsound = initial(hitsound)
|
||||
throw_speed = initial(throw_speed)
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/transform_messages(mob/living/user, supress_message_text)
|
||||
playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
if(!supress_message_text)
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/weapon/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
@@ -43,7 +43,6 @@
|
||||
out += "<span class='notice'>[bicon(tank)] It has \the [tank] mounted onto it.</span>"
|
||||
to_chat(user, out.Join("<br>"))
|
||||
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
@@ -70,7 +69,7 @@
|
||||
updateTank(tank, 1, user)
|
||||
else if(loadedWeightClass >= maxWeightClass)
|
||||
to_chat(user, "<span class='warning'>\The [src] can't hold any more items!</span>")
|
||||
else if(istype(W, /obj/item))
|
||||
else if(isitem(W))
|
||||
var/obj/item/IW = W
|
||||
load_item(IW, user)
|
||||
|
||||
@@ -142,7 +141,7 @@
|
||||
fire_items(T, user)
|
||||
if(pressureSetting >= 3 && user)
|
||||
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
user.Weaken(3)
|
||||
user.Knockdown(60)
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||
if(fire_mode == PCANNON_FIREALL)
|
||||
@@ -224,7 +223,6 @@
|
||||
return loaded
|
||||
loaded++
|
||||
CHECK_TICK
|
||||
return loaded
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie
|
||||
name = "pie cannon"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == THROWN_PROJECTILE_ATTACK)
|
||||
final_block_chance += 30
|
||||
if(attack_type == LEAP_ATTACK)
|
||||
@@ -66,7 +66,7 @@
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/active = 0
|
||||
|
||||
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/shield/energy/IsReflect()
|
||||
@@ -109,7 +109,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/active = 0
|
||||
|
||||
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
@@ -1,114 +1,109 @@
|
||||
/obj/item/weapon/twohanded/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 20
|
||||
throwforce = 15
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/charged = 5
|
||||
origin_tech = "combat=4;bluespace=4;plasmatech=7"
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
/obj/item/weapon/twohanded/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 20
|
||||
throwforce = 15
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/charged = 5
|
||||
origin_tech = "combat=4;bluespace=4;plasmatech=7"
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
force_string = "LORD SINGULOTH HIMSELF"
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/process()
|
||||
if(charged < 5)
|
||||
charged++
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(istype(X, /atom/movable))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
if(A && !A.anchored && !ishuman(X))
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
else if(ishuman(X))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
H.apply_effect(1, WEAKEN, 0)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(wielded)
|
||||
if(charged == 5)
|
||||
charged = 0
|
||||
if(istype(A, /mob/living/))
|
||||
var/mob/living/Z = A
|
||||
Z.take_bodypart_damage(20,0)
|
||||
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
|
||||
var/turf/target = get_turf(A)
|
||||
vortex(target,user)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 25
|
||||
throwforce = 30
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
//var/charged = 5
|
||||
origin_tech = "combat=4;powerstorage=7"
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
target.visible_message("<span class='danger'>[target.name] was shocked by the [src.name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack!</span>")
|
||||
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
|
||||
target.throw_at(throw_target, 200, 4)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(wielded)
|
||||
//if(charged == 5)
|
||||
//charged = 0
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
M.Stun(3)
|
||||
shock(M)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Stun(3)
|
||||
shock(L)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/process()
|
||||
if(charged < 5)
|
||||
charged++
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(ismovableatom(X))
|
||||
var/atom/movable/A = X
|
||||
if(A == wielder)
|
||||
continue
|
||||
if(A && !A.anchored && !ishuman(X))
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
step_towards(A,pull)
|
||||
else if(ishuman(X))
|
||||
var/mob/living/carbon/human/H = X
|
||||
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
H.apply_effect(20, KNOCKDOWN, 0)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(wielded)
|
||||
if(charged == 5)
|
||||
charged = 0
|
||||
if(istype(A, /mob/living/))
|
||||
var/mob/living/Z = A
|
||||
Z.take_bodypart_damage(20,0)
|
||||
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
|
||||
var/turf/target = get_turf(A)
|
||||
vortex(target,user)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 25
|
||||
throwforce = 30
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
origin_tech = "combat=4;powerstorage=7"
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target)
|
||||
target.Stun(60)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
target.visible_message("<span class='danger'>[target.name] was shocked by [src]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack!</span>")
|
||||
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
|
||||
target.throw_at(throw_target, 200, 4)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(wielded)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
shock(M)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target)
|
||||
. = ..()
|
||||
if(isliving(target))
|
||||
shock(target)
|
||||
|
||||
/obj/item/weapon/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,378 +1,378 @@
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc.
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/weapon/storage/bag
|
||||
allow_quick_gather = 1
|
||||
allow_quick_empty = 1
|
||||
display_contents_with_number = 1 // should work fine now
|
||||
use_to_pickup = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 30
|
||||
storage_slots = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
|
||||
max_combined_w_class = 60
|
||||
storage_slots = 60
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
origin_tech = "engineering=2"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(/obj/item/weapon/ore)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
storage_slots = INFINITY
|
||||
max_combined_w_class = INFINITY
|
||||
origin_tech = "bluespace=4;materials=3;engineering=3"
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
storage_slots = 100; //the number of plant pieces it can carry.
|
||||
max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/food/snacks/ash_flora,/obj/item/weapon/reagent_containers/honeycomb)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
origin_tech = "biotech=3;engineering=2"
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
close_all()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
allow_quick_empty = 1 // this function is superceded
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/mineral/wood))
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "The snatcher does not accept [W].")
|
||||
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
current += S.amount
|
||||
if(capacity == current)//If it's full, you're done
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='danger'>The snatcher is full.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
// Modified handle_item_insertion. Would prefer not to, but...
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
var/amount
|
||||
var/inserted = 0
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S2 in contents)
|
||||
current += S2.amount
|
||||
if(capacity < current + S.amount)//If the stack will fill it up
|
||||
amount = capacity - current
|
||||
else
|
||||
amount = S.amount
|
||||
|
||||
for(var/obj/item/stack/sheet/sheet in contents)
|
||||
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
|
||||
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
|
||||
S.amount -= amount
|
||||
inserted = 1
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.dropItemToGround(S)
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
qdel(S)
|
||||
else
|
||||
if(S.pulledby)
|
||||
S.pulledby.stop_pulling()
|
||||
S.loc = src
|
||||
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
// Sets up numbered display to show the stack size of each stored mineral
|
||||
// NOTE: numbered display is turned off currently because it's broken
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user)
|
||||
var/adjusted_contents = contents.len
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
if(display_contents_with_number)
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/stack/sheet/I in contents)
|
||||
adjusted_contents++
|
||||
var/datum/numbered_display/D = new/datum/numbered_display(I)
|
||||
D.number = I.amount
|
||||
numbered_contents.Add( D )
|
||||
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
|
||||
|
||||
// Modified quick_empty verb drops appropriate sized stacks
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty()
|
||||
var/location = get_turf(src)
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
while(S.amount)
|
||||
var/obj/item/stack/sheet/N = new S.type(location)
|
||||
var/stacksize = min(S.amount,N.max_amount)
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
if(!S.amount)
|
||||
qdel(S)// todo: there's probably something missing here
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
|
||||
// Instead of removing
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||
// that calls this can't recieve a different object than you clicked on.
|
||||
//Therefore, make a new stack internally that has the remainder.
|
||||
// -Sayu
|
||||
|
||||
if(S.amount > S.max_amount)
|
||||
var/obj/item/stack/sheet/temp = new S.type(src)
|
||||
temp.amount = S.amount - S.max_amount
|
||||
S.amount = S.max_amount
|
||||
|
||||
return ..(S,new_location)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
display_contents_with_number = 0 //This would look really stupid otherwise
|
||||
storage_slots = 7
|
||||
max_combined_w_class = 21
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=3000)
|
||||
preposition = "on"
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
quick_empty()
|
||||
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Weaken(2)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/proc/rebuild_overlays()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
/*
|
||||
* These absorb the functionality of the plant bag, ore satchel, etc.
|
||||
* They use the use_to_pickup, quick_gather, and quick_empty functions
|
||||
* that were already defined in weapon/storage, but which had been
|
||||
* re-implemented in other classes.
|
||||
*
|
||||
* Contains:
|
||||
* Trash Bag
|
||||
* Mining Satchel
|
||||
* Plant Bag
|
||||
* Sheet Snatcher
|
||||
* Book Bag
|
||||
* Biowaste Bag
|
||||
*
|
||||
* -Sayu
|
||||
*/
|
||||
|
||||
// Generic non-item
|
||||
/obj/item/weapon/storage/bag
|
||||
allow_quick_gather = 1
|
||||
allow_quick_empty = 1
|
||||
display_contents_with_number = 1 // should work fine now
|
||||
use_to_pickup = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
// -----------------------------
|
||||
// Trash bag
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/bag/trash
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 30
|
||||
storage_slots = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else icon_state = "[initial(icon_state)]3"
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/bluespace
|
||||
name = "trash bag of holding"
|
||||
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
|
||||
icon_state = "bluetrashbag"
|
||||
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
|
||||
max_combined_w_class = 60
|
||||
storage_slots = 60
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/ore
|
||||
name = "mining satchel"
|
||||
desc = "This little bugger can be used to store and transport ores."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "satchel"
|
||||
origin_tech = "engineering=2"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(/obj/item/weapon/ore)
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/cyborg
|
||||
name = "cyborg mining satchel"
|
||||
|
||||
/obj/item/weapon/storage/bag/ore/holding //miners, your messiah has arrived
|
||||
name = "mining satchel of holding"
|
||||
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
|
||||
storage_slots = INFINITY
|
||||
max_combined_w_class = INFINITY
|
||||
origin_tech = "bluespace=4;materials=3;engineering=3"
|
||||
icon_state = "satchel_bspace"
|
||||
|
||||
// -----------------------------
|
||||
// Plant bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/plants
|
||||
name = "plant bag"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbag"
|
||||
storage_slots = 100; //the number of plant pieces it can carry.
|
||||
max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/honeycomb)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
////////
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder
|
||||
name = "portable seed extractor"
|
||||
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
|
||||
icon_state = "portaseeder"
|
||||
origin_tech = "biotech=3;engineering=2"
|
||||
|
||||
/obj/item/weapon/storage/bag/plants/portaseeder/verb/dissolve_contents()
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
close_all()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher
|
||||
// -----------------------------
|
||||
// Because it stacks stacks, this doesn't operate normally.
|
||||
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher
|
||||
name = "sheet snatcher"
|
||||
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "sheetsnatcher"
|
||||
|
||||
var/capacity = 300; //the number of sheets it can carry.
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
allow_quick_empty = 1 // this function is superceded
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/mineral/wood))
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "The snatcher does not accept [W].")
|
||||
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
current += S.amount
|
||||
if(capacity == current)//If it's full, you're done
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='danger'>The snatcher is full.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
// Modified handle_item_insertion. Would prefer not to, but...
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
var/amount
|
||||
var/inserted = 0
|
||||
var/current = 0
|
||||
for(var/obj/item/stack/sheet/S2 in contents)
|
||||
current += S2.amount
|
||||
if(capacity < current + S.amount)//If the stack will fill it up
|
||||
amount = capacity - current
|
||||
else
|
||||
amount = S.amount
|
||||
|
||||
for(var/obj/item/stack/sheet/sheet in contents)
|
||||
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
|
||||
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
|
||||
S.amount -= amount
|
||||
inserted = 1
|
||||
break
|
||||
|
||||
if(!inserted || !S.amount)
|
||||
usr.dropItemToGround(S)
|
||||
if (usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
qdel(S)
|
||||
else
|
||||
if(S.pulledby)
|
||||
S.pulledby.stop_pulling()
|
||||
S.loc = src
|
||||
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
// Sets up numbered display to show the stack size of each stored mineral
|
||||
// NOTE: numbered display is turned off currently because it's broken
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user)
|
||||
var/adjusted_contents = contents.len
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
if(display_contents_with_number)
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/stack/sheet/I in contents)
|
||||
adjusted_contents++
|
||||
var/datum/numbered_display/D = new/datum/numbered_display(I)
|
||||
D.number = I.amount
|
||||
numbered_contents.Add( D )
|
||||
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
|
||||
|
||||
// Modified quick_empty verb drops appropriate sized stacks
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty()
|
||||
var/location = get_turf(src)
|
||||
for(var/obj/item/stack/sheet/S in contents)
|
||||
while(S.amount)
|
||||
var/obj/item/stack/sheet/N = new S.type(location)
|
||||
var/stacksize = min(S.amount,N.max_amount)
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
if(!S.amount)
|
||||
qdel(S)// todo: there's probably something missing here
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
update_icon()
|
||||
|
||||
// Instead of removing
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!istype(S)) return 0
|
||||
|
||||
//I would prefer to drop a new stack, but the item/attack_hand code
|
||||
// that calls this can't recieve a different object than you clicked on.
|
||||
//Therefore, make a new stack internally that has the remainder.
|
||||
// -Sayu
|
||||
|
||||
if(S.amount > S.max_amount)
|
||||
var/obj/item/stack/sheet/temp = new S.type(src)
|
||||
temp.amount = S.amount - S.max_amount
|
||||
S.amount = S.max_amount
|
||||
|
||||
return ..(S,new_location)
|
||||
|
||||
// -----------------------------
|
||||
// Sheet Snatcher (Cyborg)
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/sheetsnatcher/borg
|
||||
name = "sheet snatcher 9000"
|
||||
desc = ""
|
||||
capacity = 500//Borgs get more because >specialization
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Book bag
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/bag/books
|
||||
name = "book bag"
|
||||
desc = "A bag for books."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookbag"
|
||||
display_contents_with_number = 0 //This would look really stupid otherwise
|
||||
storage_slots = 7
|
||||
max_combined_w_class = 21
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
|
||||
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Trays - Agouri
|
||||
*/
|
||||
/obj/item/weapon/storage/bag/tray
|
||||
name = "tray"
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "tray"
|
||||
desc = "A metal tray to lay food on."
|
||||
force = 5
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=3000)
|
||||
preposition = "on"
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
quick_empty()
|
||||
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
|
||||
if(prob(50))
|
||||
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
|
||||
else
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/proc/rebuild_overlays()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
add_overlay(mutable_appearance(I.icon, I.icon_state))
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
rebuild_overlays()
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
rebuild_overlays()
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
|
||||
add_overlay(mutable_appearance(I.icon, I.icon_state))
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
storage_slots = 25
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse, /obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||
resistance_flags = FLAMMABLE
|
||||
. = ..()
|
||||
|
||||
|
||||
/*
|
||||
* Chemistry bag
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/chemistry
|
||||
name = "chemistry bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bag"
|
||||
desc = "A bag for storing pills, patches, and bottles."
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/bag/bio
|
||||
name = "bio bag"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "biobag"
|
||||
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
|
||||
storage_slots = 25
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse, /obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
@@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
if (user.disabilities & CLUMSY && prob(50))
|
||||
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_bodypart_damage(10)
|
||||
user.Paralyse(20)
|
||||
user.Unconscious(400)
|
||||
return
|
||||
|
||||
var/chaplain = 0
|
||||
@@ -106,10 +106,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
to_chat(user, "<span class='danger'>The book sizzles in your hands.</span>")
|
||||
user.take_bodypart_damage(0,10)
|
||||
return
|
||||
|
||||
|
||||
if (!heal_mode)
|
||||
return ..()
|
||||
|
||||
|
||||
var/smack = 1
|
||||
|
||||
if (M.stat != DEAD)
|
||||
@@ -175,7 +175,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
var/uses = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
||||
if (uses)
|
||||
H.mind.isholy = TRUE
|
||||
|
||||
@@ -886,14 +886,4 @@
|
||||
|
||||
/obj/item/weapon/storage/box/fountainpens/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/pen/fountain(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/medipens/surival_box
|
||||
name = "Survival Pen Pack"
|
||||
desc = "A pack of survival Pens to keep even the most retarded of miners alive"
|
||||
illustration = "syringe"
|
||||
|
||||
/obj/item/weapon/storage/box/medipens/surival_box/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/survival(src)
|
||||
new /obj/item/weapon/pen/fountain(src)
|
||||
@@ -1,271 +1,271 @@
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/weapon/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/weapon/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/weapon/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/weapon/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
/*
|
||||
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
|
||||
* .. Sorry for the shitty path name, I couldnt think of a better one.
|
||||
*
|
||||
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
|
||||
* TODO: Cigarette boxes should be ported to this standard
|
||||
*
|
||||
* Contains:
|
||||
* Donut Box
|
||||
* Egg Box
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
name = "donut box"
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type = "donut"
|
||||
var/spawn_type = null
|
||||
var/fancy_open = FALSE
|
||||
|
||||
/obj/item/weapon/storage/fancy/PopulateContents()
|
||||
for(var/i = 1 to storage_slots)
|
||||
new spawn_type(src)
|
||||
|
||||
/obj/item/weapon/storage/fancy/update_icon(itemremoved = 0)
|
||||
if(fancy_open)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
else
|
||||
icon_state = "[icon_type]box"
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
..()
|
||||
if(fancy_open)
|
||||
if(contents.len == 1)
|
||||
to_chat(user, "There is one [src.icon_type] left.")
|
||||
else
|
||||
to_chat(user, "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left.")
|
||||
|
||||
/obj/item/weapon/storage/fancy/attack_self(mob/user)
|
||||
fancy_open = !fancy_open
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/content_can_dump(atom/dest_object, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
fancy_open = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/fancy/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
fancy_open = TRUE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Donut Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/donut_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "donutbox6"
|
||||
icon_type = "donut"
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/donut
|
||||
fancy_open = TRUE
|
||||
|
||||
/*
|
||||
* Egg Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
|
||||
/*
|
||||
* Candle Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box
|
||||
name = "candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox5"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
spawn_type = /obj/item/candle
|
||||
fancy_open = TRUE
|
||||
|
||||
/obj/item/weapon/storage/fancy/candle_box/attack_self(mob_user)
|
||||
return
|
||||
|
||||
////////////
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/storage/fancy/cigarettes
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig"
|
||||
item_state = "cigpacket"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.get_active_held_item())
|
||||
return
|
||||
for(var/obj/item/weapon/lighter/lighter in src)
|
||||
remove_from_storage(lighter, user.loc)
|
||||
user.put_in_active_hand(lighter)
|
||||
break
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
|
||||
if(fancy_open || !contents.len)
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/i = contents.len
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
inserted_overlay.pixel_x = 1 * (i - 1)
|
||||
if(istype(C, /obj/item/weapon/lighter/greyscale))
|
||||
if(istype(C, /obj/item/weapon/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/weapon/lighter))
|
||||
else if(istype(C, /obj/item/weapon/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
else
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
add_overlay(inserted_overlay)
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/weapon/rollingpaper)
|
||||
spawn_type = /obj/item/weapon/rollingpaper
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/update_icon()
|
||||
i--
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(cig)
|
||||
if(M == user && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/W = cig
|
||||
remove_from_storage(W, M)
|
||||
M.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
contents -= W
|
||||
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "dromedary"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/dromedary
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "uplift"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/uplift
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robust"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robust
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustg"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carp"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/carp
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndie"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midori"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name = "\improper Shady Jim's Super Slims packet"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of NanoTrasen brand rolling papers."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/weapon/rollingpaper)
|
||||
spawn_type = /obj/item/weapon/rollingpaper
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
if(!contents.len)
|
||||
add_overlay("[icon_state]_empty")
|
||||
|
||||
/////////////
|
||||
//CIGAR BOX//
|
||||
/////////////
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars
|
||||
name = "\improper premium cigar case"
|
||||
desc = "A case of premium cigars. Very expensive."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigarcase"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
storage_slots = 5
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/update_icon()
|
||||
cut_overlays()
|
||||
if(fancy_open)
|
||||
add_overlay("[icon_state]_open")
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, icon_type)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
for(var/c = contents.len, c >= 1, c--)
|
||||
cigar_overlay.pixel_x = 4 * (c - 1)
|
||||
add_overlay(cigar_overlay)
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
else
|
||||
icon_state = "cigarcase"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/cohiba
|
||||
name = "\improper cohiba robusto cigar case"
|
||||
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigars/havana
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/weapon/storage/firstaid
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/empty = 0
|
||||
|
||||
/obj/item/weapon/storage/firstaid/regular
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/weapon/storage/firstaid/regular/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/weapon/storage/firstaid
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/empty = 0
|
||||
|
||||
/obj/item/weapon/storage/firstaid/regular
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
|
||||
/obj/item/weapon/storage/firstaid/regular/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/ancient
|
||||
icon_state = "firstaid"
|
||||
desc = "A first aid kit with the ability to heal common types of injuries."
|
||||
@@ -47,167 +47,167 @@
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
new /obj/item/stack/medical/ointment(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/fire
|
||||
name = "burn treatment kit"
|
||||
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/fire/Initialize(mapload)
|
||||
..()
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
/obj/item/weapon/storage/firstaid/fire/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin
|
||||
name = "toxin treatment kit"
|
||||
desc = "Used to treat toxic blood content and radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/syringe/charcoal(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/weapon/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/o2
|
||||
name = "oxygen deprivation treatment kit"
|
||||
desc = "A box full of oxygen goodies."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/o2/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A first aid kit for when you get toolboxed."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/brute/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/tactical
|
||||
name = "combat medical kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/storage/firstaid/tactical/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
/obj/item/weapon/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
icon_state = "pill_canister"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice)
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen) || !Adjacent(M))
|
||||
return ..()
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
add_fingerprint(usr)
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/charcoal
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/charcoal/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/epinephrine
|
||||
name = "bottle of epinephrine pills"
|
||||
desc = "Contains pills used to stabilize patients."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/epinephrine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/epinephrine(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mutadone
|
||||
name = "bottle of mutadone pills"
|
||||
desc = "Contains pills used to treat genetic abnormalities."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mutadone/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/mutadone(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mannitol
|
||||
name = "bottle of mannitol pills"
|
||||
desc = "Contains pills used to treat brain damage."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mannitol/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/stimulant
|
||||
name = "bottle of stimulant pills"
|
||||
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/stimulant/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/reagent_containers/pill/stimulant(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mining
|
||||
name = "bottle of patches"
|
||||
desc = "Contains patches used to treat brute and burn damage."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mining/PopulateContents()
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
/obj/item/weapon/storage/firstaid/fire
|
||||
name = "burn treatment kit"
|
||||
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/fire/Initialize(mapload)
|
||||
..()
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
/obj/item/weapon/storage/firstaid/fire/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin
|
||||
name = "toxin treatment kit"
|
||||
desc = "Used to treat toxic blood content and radiation poisoning."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
/obj/item/weapon/storage/firstaid/toxin/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/syringe/charcoal(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/weapon/storage/pill_bottle/charcoal(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/o2
|
||||
name = "oxygen deprivation treatment kit"
|
||||
desc = "A box full of oxygen goodies."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/o2/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A first aid kit for when you get toolboxed."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/brute/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/device/healthanalyzer(src)
|
||||
|
||||
/obj/item/weapon/storage/firstaid/tactical
|
||||
name = "combat medical kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/storage/firstaid/tactical/PopulateContents()
|
||||
if(empty)
|
||||
return
|
||||
new /obj/item/stack/medical/gauze(src)
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
/obj/item/weapon/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
icon_state = "pill_canister"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice)
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen) || !Adjacent(M))
|
||||
return ..()
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
add_fingerprint(usr)
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/charcoal
|
||||
name = "bottle of charcoal pills"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/charcoal/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/epinephrine
|
||||
name = "bottle of epinephrine pills"
|
||||
desc = "Contains pills used to stabilize patients."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/epinephrine/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/epinephrine(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mutadone
|
||||
name = "bottle of mutadone pills"
|
||||
desc = "Contains pills used to treat genetic abnormalities."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mutadone/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/mutadone(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mannitol
|
||||
name = "bottle of mannitol pills"
|
||||
desc = "Contains pills used to treat brain damage."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mannitol/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/weapon/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/stimulant
|
||||
name = "bottle of stimulant pills"
|
||||
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/stimulant/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/reagent_containers/pill/stimulant(src)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mining
|
||||
name = "bottle of patches"
|
||||
desc = "Contains patches used to treat brute and burn damage."
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/mining/PopulateContents()
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
|
||||
|
||||
@@ -68,3 +68,22 @@
|
||||
|
||||
/obj/item/weapon/storage/internal/pocket/small/detective/PopulateContents()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/flask/det(src)
|
||||
|
||||
/obj/item/weapon/storage/internal/pocket/pocketprotector
|
||||
storage_slots = 3
|
||||
max_w_class = WEIGHT_CLASS_TINY
|
||||
can_hold = list( //Same items as a PDA
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/weapon/lipstick,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/clothing/mask/cigarette)
|
||||
|
||||
/obj/item/weapon/storage/internal/pocket/pocketprotector/cosmetology/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/lipstick/random(src)
|
||||
|
||||
/obj/item/weapon/storage/internal/pocket/pocketprotector/full/PopulateContents()
|
||||
new /obj/item/weapon/pen/red(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
new /obj/item/weapon/pen/blue(src)
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
@@ -84,7 +85,6 @@
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(GLOB.access_security)
|
||||
@@ -124,7 +124,6 @@
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
@@ -163,9 +162,8 @@
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
req_access = list(GLOB.access_hos)
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
obj/item/weapon/storage/lockbox/medal/sec/PopulateContents()
|
||||
/obj/item/weapon/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
@@ -173,8 +171,7 @@ obj/item/weapon/storage/lockbox/medal/sec/PopulateContents()
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
req_access = list(GLOB.access_rd)
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
@@ -1,195 +1,195 @@
|
||||
/*
|
||||
* Absorbs /obj/item/weapon/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = 1
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = 0
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/weapon/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/weapon/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
cut_overlays()
|
||||
/*
|
||||
* Absorbs /obj/item/weapon/secstorage.
|
||||
* Reimplements it only slightly to use existing storage functionality.
|
||||
*
|
||||
* Contains:
|
||||
* Secure Briefcase
|
||||
* Wall Safe
|
||||
*/
|
||||
|
||||
// -----------------------------
|
||||
// Generic Item
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/secure
|
||||
name = "secstorage"
|
||||
var/icon_locking = "secureb"
|
||||
var/icon_sparking = "securespark"
|
||||
var/icon_opened = "secure0"
|
||||
var/locked = 1
|
||||
var/code = ""
|
||||
var/l_code = null
|
||||
var/l_set = 0
|
||||
var/l_setshort = 0
|
||||
var/l_hacking = 0
|
||||
var/open = 0
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
max_combined_w_class = 14
|
||||
|
||||
/obj/item/weapon/storage/secure/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100*W.toolspeed, target = src))
|
||||
if (prob(33))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
|
||||
sleep(80)
|
||||
src.l_setshort = 0
|
||||
src.l_hacking = 0
|
||||
else
|
||||
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
|
||||
src.l_hacking = 0
|
||||
else
|
||||
src.l_hacking = 0
|
||||
return
|
||||
//At this point you have exhausted all the special things to do when locked
|
||||
// ... but it's still locked.
|
||||
return
|
||||
|
||||
// -> storage/attackby() what with handle insertion, etc
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
src.add_fingerprint(usr)
|
||||
to_chat(usr, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/secure/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
/obj/item/weapon/storage/secure/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
cut_overlays()
|
||||
add_overlay(icon_opened)
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/secure/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/weapon/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = 1
|
||||
density = 0
|
||||
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
cut_overlays()
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", sanitize_text(href_list["type"]))
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/secure/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Briefcase
|
||||
// -----------------------------
|
||||
/obj/item/weapon/storage/secure/briefcase
|
||||
name = "secure briefcase"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
desc = "A large briefcase with a digital locking system."
|
||||
force = 8
|
||||
hitsound = "swing_hit"
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 21
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/PopulateContents()
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
..()
|
||||
|
||||
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
|
||||
/obj/item/weapon/storage/secure/briefcase/syndie
|
||||
force = 15
|
||||
|
||||
/obj/item/weapon/storage/secure/briefcase/syndie/PopulateContents()
|
||||
..()
|
||||
for(var/i = 0, i < storage_slots - 2, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
// Secure Safe
|
||||
// -----------------------------
|
||||
|
||||
/obj/item/weapon/storage/secure/safe
|
||||
name = "secure safe"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "safe"
|
||||
icon_opened = "safe0"
|
||||
icon_locking = "safeb"
|
||||
icon_sparking = "safespark"
|
||||
force = 8
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_w_class = 8
|
||||
anchored = 1
|
||||
density = 0
|
||||
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/PopulateContents()
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/attack_hand(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/HoS
|
||||
name = "head of security's safe"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -238,6 +238,15 @@
|
||||
new /obj/item/nuke_core_container(src)
|
||||
new /obj/item/weapon/paper/nuke_instructions(src)
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/supermatter
|
||||
name = "box"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/supermatter/PopulateContents()
|
||||
new /obj/item/weapon/scalpel/supermatter(src)
|
||||
new /obj/item/weapon/hemostat/supermatter(src)
|
||||
new /obj/item/nuke_core_container/supermatter(src)
|
||||
new /obj/item/weapon/paper/supermatter_sliver_instructions(src)
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/tuberculosisgrenade
|
||||
name = "boxed virus grenade kit"
|
||||
|
||||
@@ -296,10 +305,3 @@
|
||||
/obj/item/weapon/storage/box/syndie_kit/mimery/PopulateContents()
|
||||
new /obj/item/weapon/spellbook/oneuse/mimery_blockade(src)
|
||||
new /obj/item/weapon/spellbook/oneuse/mimery_guns(src)
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/holoparasite
|
||||
name = "box"
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/holoparasite/PopulateContents()
|
||||
new /obj/item/weapon/guardiancreator/tech/choose/traitor(src)
|
||||
new /obj/item/weapon/paper/guardian(src)
|
||||
@@ -11,12 +11,15 @@
|
||||
attack_verb = list("beaten")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 50, bio = 0, rad = 0, fire = 80, acid = 80)
|
||||
|
||||
var/stunforce = 7
|
||||
var/stunforce = 140
|
||||
var/status = 0
|
||||
var/obj/item/weapon/stock_parts/cell/high/cell = null
|
||||
var/obj/item/weapon/stock_parts/cell/high/cell
|
||||
var/hitcost = 1000
|
||||
var/throw_hit_chance = 35
|
||||
|
||||
/obj/item/weapon/melee/baton/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/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)
|
||||
@@ -33,6 +36,7 @@
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed.
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(chrgdeductamt)
|
||||
@@ -106,7 +110,7 @@
|
||||
if(status && user.disabilities & CLUMSY && prob(50))
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
user.Weaken(stunforce*3)
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
|
||||
@@ -137,8 +141,8 @@
|
||||
/obj/item/weapon/melee/baton/proc/baton_stun(mob/living/L, mob/user)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return 0
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
@@ -148,8 +152,7 @@
|
||||
if(!deductcharge(hitcost))
|
||||
return 0
|
||||
|
||||
L.Stun(stunforce)
|
||||
L.Weaken(stunforce)
|
||||
L.Knockdown(stunforce)
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
if(user)
|
||||
user.lastattacked = L
|
||||
@@ -158,7 +161,7 @@
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
add_logs(user, L, "stunned")
|
||||
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
@@ -180,7 +183,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stunforce = 5
|
||||
stunforce = 100
|
||||
hitcost = 2000
|
||||
throw_hit_chance = 10
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
@@ -1,209 +1,209 @@
|
||||
/obj/item/weapon/tank/jetpack
|
||||
name = "jetpack (empty)"
|
||||
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/gas_type = "o2"
|
||||
var/on = FALSE
|
||||
var/stabilizers = FALSE
|
||||
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
/obj/item/weapon/tank/jetpack/New()
|
||||
..()
|
||||
if(gas_type)
|
||||
air_contents.assert_gas(gas_type)
|
||||
air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_jetpack))
|
||||
cycle(user)
|
||||
else if(istype(action, /datum/action/item_action/jetpack_stabilization))
|
||||
if(on)
|
||||
stabilizers = !stabilizers
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack stabilization [stabilizers ? "on" : "off"].</span>")
|
||||
else
|
||||
toggle_internals(user)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/cycle(mob/user)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
if(!on)
|
||||
turn_on()
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack on.</span>")
|
||||
else
|
||||
turn_off()
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_on()
|
||||
on = TRUE
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
ion_trail.start()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_off()
|
||||
on = FALSE
|
||||
stabilizers = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.stop()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user)
|
||||
if(!on)
|
||||
return
|
||||
if((num < 0.005 || air_contents.total_moles() < num))
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suicide_act(mob/user)
|
||||
if (istype(user,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?")
|
||||
H.visible_message("<span class='suicide'>[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!</span>")
|
||||
return (OXYLOSS)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/void
|
||||
name = "void jetpack (oxygen)"
|
||||
desc = "It works well in a void."
|
||||
icon_state = "jetpack-void"
|
||||
item_state = "jetpack-void"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen
|
||||
name = "jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/harness
|
||||
name = "jet harness (oxygen)"
|
||||
desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks."
|
||||
icon_state = "jetpack-mini"
|
||||
item_state = "jetpack-mini"
|
||||
volume = 40
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/captain
|
||||
name = "\improper Captain's jetpack"
|
||||
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
|
||||
icon_state = "jetpack-captain"
|
||||
item_state = "jetpack-captain"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
volume = 90
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy.
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/security
|
||||
name = "security jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces."
|
||||
icon_state = "jetpack-sec"
|
||||
item_state = "jetpack-sec"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
name = "jetpack (carbon dioxide)"
|
||||
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
distribute_pressure = 0
|
||||
gas_type = "co2"
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit
|
||||
name = "hardsuit jetpack upgrade"
|
||||
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
|
||||
origin_tech = "materials=4;magnets=4;engineering=5"
|
||||
icon_state = "jetpack-mining"
|
||||
item_state = "jetpack-black"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
volume = 1
|
||||
slot_flags = null
|
||||
gas_type = null
|
||||
full_speed = FALSE
|
||||
var/datum/gas_mixture/temp_air_contents
|
||||
var/obj/item/weapon/tank/internals/tank = null
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/New()
|
||||
..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
temp_air_contents = air_contents
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/cycle(mob/user)
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
|
||||
to_chat(user, "<span class='warning'>\The [src] must be connected to a hardsuit!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!istype(H.s_store, /obj/item/weapon/tank/internals))
|
||||
to_chat(user, "<span class='warning'>You need a tank in your suit storage!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/turn_on()
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
|
||||
return
|
||||
var/mob/living/carbon/human/H = loc.loc
|
||||
tank = H.s_store
|
||||
air_contents = tank.air_contents
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/turn_off()
|
||||
tank = null
|
||||
air_contents = temp_air_contents
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/process()
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
|
||||
turn_off()
|
||||
return
|
||||
var/mob/living/carbon/human/H = loc.loc
|
||||
if(!tank || tank != H.s_store)
|
||||
turn_off()
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
//Return a jetpack that the mob can use
|
||||
//Back worn jetpacks, hardsuit internal packs, and so on.
|
||||
/obj/item/weapon/tank/jetpack
|
||||
name = "jetpack (empty)"
|
||||
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/gas_type = "o2"
|
||||
var/on = FALSE
|
||||
var/stabilizers = FALSE
|
||||
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail
|
||||
|
||||
/obj/item/weapon/tank/jetpack/New()
|
||||
..()
|
||||
if(gas_type)
|
||||
air_contents.assert_gas(gas_type)
|
||||
air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
|
||||
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_jetpack))
|
||||
cycle(user)
|
||||
else if(istype(action, /datum/action/item_action/jetpack_stabilization))
|
||||
if(on)
|
||||
stabilizers = !stabilizers
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack stabilization [stabilizers ? "on" : "off"].</span>")
|
||||
else
|
||||
toggle_internals(user)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/cycle(mob/user)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
if(!on)
|
||||
turn_on()
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack on.</span>")
|
||||
else
|
||||
turn_off()
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_on()
|
||||
on = TRUE
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
ion_trail.start()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/turn_off()
|
||||
on = FALSE
|
||||
stabilizers = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.stop()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user)
|
||||
if(!on)
|
||||
return
|
||||
if((num < 0.005 || air_contents.total_moles() < num))
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suicide_act(mob/user)
|
||||
if (istype(user,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?")
|
||||
H.visible_message("<span class='suicide'>[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!</span>")
|
||||
return (OXYLOSS)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/void
|
||||
name = "void jetpack (oxygen)"
|
||||
desc = "It works well in a void."
|
||||
icon_state = "jetpack-void"
|
||||
item_state = "jetpack-void"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen
|
||||
name = "jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/harness
|
||||
name = "jet harness (oxygen)"
|
||||
desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks."
|
||||
icon_state = "jetpack-mini"
|
||||
item_state = "jetpack-mini"
|
||||
volume = 40
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/captain
|
||||
name = "\improper Captain's jetpack"
|
||||
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
|
||||
icon_state = "jetpack-captain"
|
||||
item_state = "jetpack-captain"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
volume = 90
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy.
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/security
|
||||
name = "security jetpack (oxygen)"
|
||||
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces."
|
||||
icon_state = "jetpack-sec"
|
||||
item_state = "jetpack-sec"
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
name = "jetpack (carbon dioxide)"
|
||||
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
distribute_pressure = 0
|
||||
gas_type = "co2"
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit
|
||||
name = "hardsuit jetpack upgrade"
|
||||
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
|
||||
origin_tech = "materials=4;magnets=4;engineering=5"
|
||||
icon_state = "jetpack-mining"
|
||||
item_state = "jetpack-black"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
volume = 1
|
||||
slot_flags = null
|
||||
gas_type = null
|
||||
full_speed = FALSE
|
||||
var/datum/gas_mixture/temp_air_contents
|
||||
var/obj/item/weapon/tank/internals/tank = null
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/New()
|
||||
..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
temp_air_contents = air_contents
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/cycle(mob/user)
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
|
||||
to_chat(user, "<span class='warning'>\The [src] must be connected to a hardsuit!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!istype(H.s_store, /obj/item/weapon/tank/internals))
|
||||
to_chat(user, "<span class='warning'>You need a tank in your suit storage!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/turn_on()
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
|
||||
return
|
||||
var/mob/living/carbon/human/H = loc.loc
|
||||
tank = H.s_store
|
||||
air_contents = tank.air_contents
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/turn_off()
|
||||
tank = null
|
||||
air_contents = temp_air_contents
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/jetpack/suit/process()
|
||||
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
|
||||
turn_off()
|
||||
return
|
||||
var/mob/living/carbon/human/H = loc.loc
|
||||
if(!tank || tank != H.s_store)
|
||||
turn_off()
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
//Return a jetpack that the mob can use
|
||||
//Back worn jetpacks, hardsuit internal packs, and so on.
|
||||
//Used in Process_Spacemove() and wherever you want to check for/get a jetpack
|
||||
|
||||
/mob/proc/get_jetpack()
|
||||
return
|
||||
|
||||
/mob/living/carbon/get_jetpack()
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if(istype(J))
|
||||
return J
|
||||
|
||||
/mob/living/carbon/human/get_jetpack()
|
||||
var/obj/item/weapon/tank/jetpack/J = ..()
|
||||
if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
|
||||
/mob/proc/get_jetpack()
|
||||
return
|
||||
|
||||
/mob/living/carbon/get_jetpack()
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if(istype(J))
|
||||
return J
|
||||
|
||||
/mob/living/carbon/human/get_jetpack()
|
||||
var/obj/item/weapon/tank/jetpack/J = ..()
|
||||
if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
|
||||
@@ -1,183 +1,183 @@
|
||||
/* Types of tanks!
|
||||
* Contains:
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
|
||||
/*
|
||||
* Oxygen
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/oxygen
|
||||
name = "oxygen tank"
|
||||
desc = "A tank of oxygen."
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas("o2")
|
||||
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/red
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
dog_fashion = null
|
||||
|
||||
|
||||
/*
|
||||
* Anesthetic
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/anesthetic
|
||||
name = "anesthetic tank"
|
||||
desc = "A tank with an N2O/O2 gas mix."
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
force = 10
|
||||
|
||||
/obj/item/weapon/tank/internals/anesthetic/New()
|
||||
..()
|
||||
air_contents.assert_gases("o2", "n2o")
|
||||
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases["n2o"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/air
|
||||
name = "air tank"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "oxygen"
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/weapon/tank/internals/air/New()
|
||||
..()
|
||||
air_contents.assert_gases("o2","n2")
|
||||
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases["n2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/plasma
|
||||
name = "plasma tank"
|
||||
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "plasma"
|
||||
flags = CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
force = 8
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/flamethrower))
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank))
|
||||
return
|
||||
if(!user.transferItemToLoc(src, F))
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
F.update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasmaman Plasma Tank
|
||||
*/
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman
|
||||
name = "plasma internals tank"
|
||||
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
|
||||
icon_state = "plasmaman_tank"
|
||||
item_state = "plasmaman_tank"
|
||||
force = 10
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/belt
|
||||
icon_state = "plasmaman_tank_belt"
|
||||
item_state = "plasmaman_tank_belt"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
/* Types of tanks!
|
||||
* Contains:
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
|
||||
/*
|
||||
* Oxygen
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/oxygen
|
||||
name = "oxygen tank"
|
||||
desc = "A tank of oxygen."
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas("o2")
|
||||
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/weapon/tank/internals/oxygen/red
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
dog_fashion = null
|
||||
|
||||
|
||||
/*
|
||||
* Anesthetic
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/anesthetic
|
||||
name = "anesthetic tank"
|
||||
desc = "A tank with an N2O/O2 gas mix."
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
force = 10
|
||||
|
||||
/obj/item/weapon/tank/internals/anesthetic/New()
|
||||
..()
|
||||
air_contents.assert_gases("o2", "n2o")
|
||||
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases["n2o"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/air
|
||||
name = "air tank"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "oxygen"
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/weapon/tank/internals/air/New()
|
||||
..()
|
||||
air_contents.assert_gases("o2","n2")
|
||||
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases["n2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/plasma
|
||||
name = "plasma tank"
|
||||
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "plasma"
|
||||
flags = CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
force = 8
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/flamethrower))
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank))
|
||||
return
|
||||
if(!user.transferItemToLoc(src, F))
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
F.update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/tank/internals/plasma/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasmaman Plasma Tank
|
||||
*/
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman
|
||||
name = "plasma internals tank"
|
||||
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
|
||||
icon_state = "plasmaman_tank"
|
||||
item_state = "plasmaman_tank"
|
||||
force = 10
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/belt
|
||||
icon_state = "plasmaman_tank_belt"
|
||||
item_state = "plasmaman_tank_belt"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
volume = 6
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen
|
||||
name = "emergency oxygen tank"
|
||||
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
|
||||
icon_state = "emergency"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 4
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas("o2")
|
||||
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/engi
|
||||
name = "extended-capacity emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 6
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/double
|
||||
name = "double emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 10
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
|
||||
..()
|
||||
air_contents.assert_gas("plasma")
|
||||
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen
|
||||
name = "emergency oxygen tank"
|
||||
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
|
||||
icon_state = "emergency"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 4
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas("o2")
|
||||
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/engi
|
||||
name = "extended-capacity emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 6
|
||||
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen/double
|
||||
name = "double emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 10
|
||||
|
||||
@@ -295,6 +295,10 @@
|
||||
if(nozzle_mode == RESIN_FOAM)
|
||||
if(!Adj|| !isturf(target))
|
||||
return
|
||||
for(var/S in target)
|
||||
if(istype(S, /obj/effect/particle_effect/foam/metal/resin) || istype(S, /obj/structure/foamedmetal/resin))
|
||||
to_chat(user, "<span class='warning'>There's already resin here!</span>")
|
||||
return
|
||||
if(metal_synthesis_cooldown < 5)
|
||||
var/obj/effect/particle_effect/foam/metal/resin/F = new (get_turf(target))
|
||||
F.amount = 0
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
|
||||
#define SOURCE_PORTAL 1
|
||||
#define DESTINATION_PORTAL 2
|
||||
|
||||
/* Teleportation devices.
|
||||
* Contains:
|
||||
* Locator
|
||||
@@ -110,7 +114,7 @@ Frequency:
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
if (ismob(src.loc))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
@@ -136,7 +140,19 @@ Frequency:
|
||||
origin_tech = "magnets=3;bluespace=4"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/active_portals = 0
|
||||
var/list/active_portal_pairs
|
||||
var/max_portal_pairs = 3
|
||||
|
||||
/obj/item/weapon/hand_tele/Initialize()
|
||||
. = ..()
|
||||
active_portal_pairs = list()
|
||||
|
||||
/obj/item/weapon/hand_tele/afterattack(atom/target, mob/user, proximity, params)
|
||||
if(is_parent_of_portal(target))
|
||||
qdel(target)
|
||||
to_chat(user, "<span class='notice'>You dispel [target] remotely with \the [src]!</span>")
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/hand_tele/attack_self(mob/user)
|
||||
var/turf/current_location = get_turf(user)//What turf is the user on?
|
||||
@@ -169,7 +185,7 @@ Frequency:
|
||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
|
||||
if (!t1 || user.get_active_held_item() != src || user.incapacitated())
|
||||
return
|
||||
if(active_portals >= 3)
|
||||
if(active_portal_pairs.len >= max_portal_pairs)
|
||||
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
|
||||
return
|
||||
var/atom/T = L[t1]
|
||||
@@ -178,7 +194,22 @@ Frequency:
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", 2)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(src), T, src)
|
||||
try_move_adjacent(P)
|
||||
active_portals++
|
||||
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1)
|
||||
if(!(LAZYLEN(created) == 2))
|
||||
return
|
||||
try_move_adjacent(created[1])
|
||||
active_portal_pairs[created[1]] = created[2]
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/hand_tele/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
active_portal_pairs -= P //If this portal pair is made by us it'll be erased along with the other portal by the portal.
|
||||
|
||||
/obj/item/weapon/hand_tele/proc/is_parent_of_portal(obj/effect/portal/P)
|
||||
if(!istype(P))
|
||||
return FALSE
|
||||
if(active_portal_pairs[P])
|
||||
return SOURCE_PORTAL
|
||||
for(var/i in active_portal_pairs)
|
||||
if(active_portal_pairs[i] == P)
|
||||
return DESTINATION_PORTAL
|
||||
return FALSE
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
if(do_teleport(user, get_turf(user), 50))//honk honk
|
||||
user.Weaken(stunforce*3)
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
else
|
||||
user.Weaken(stunforce*3)
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost/4)
|
||||
return
|
||||
else
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -313,7 +313,7 @@
|
||||
else
|
||||
user.adjustStaminaLoss(25)
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
|
||||
/obj/item/weapon/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(wielded)
|
||||
return ..()
|
||||
return 0
|
||||
@@ -518,7 +518,7 @@
|
||||
armour_penetration = 100
|
||||
force_on = 30
|
||||
|
||||
/obj/item/weapon/twohanded/required/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/twohanded/required/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
owner.visible_message("<span class='danger'>Ranged attacks just make [owner] angrier!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
@@ -618,10 +618,10 @@
|
||||
/obj/item/weapon/twohanded/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity || !wielded)
|
||||
return
|
||||
if(istype(target, /turf/closed/wall))
|
||||
if(iswallturf(target))
|
||||
var/turf/closed/wall/W = target
|
||||
user.visible_message("<span class='danger'>[user] blasts \the [target] with \the [src]!</span>")
|
||||
playsound(target, 'sound/magic/Disintegrate.ogg', 100, 1)
|
||||
playsound(target, 'sound/magic/disintegrate.ogg', 100, 1)
|
||||
W.break_wall()
|
||||
return 1
|
||||
..()
|
||||
@@ -644,7 +644,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/twohanded/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/weapon/twohanded/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(wielded)
|
||||
final_block_chance *= 2
|
||||
if(wielded || attack_type != PROJECTILE_ATTACK)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/item/weapon/vending_refill/clothing
|
||||
machine_name = "ClothesMate"
|
||||
icon_state = "refill_clothes"
|
||||
charges = list(35, 4, 6)// of 101 standard, 12 contraband, 10 premium(?)
|
||||
charges = list(31, 4, 4)// of 101 standard, 12 contraband, 10 premium(?)
|
||||
init_charges = list(31, 4, 4)
|
||||
|
||||
/obj/item/weapon/vending_refill/medical
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
remove_atom_colour(ADMIN_COLOUR_PRIORITY)
|
||||
|
||||
name = new_name
|
||||
playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/katana
|
||||
name = "katana"
|
||||
@@ -280,7 +280,7 @@
|
||||
throw_range = 6
|
||||
materials = list(MAT_METAL=12000)
|
||||
origin_tech = "engineering=3;combat=2"
|
||||
hitsound = 'sound/weapons/Genhit.ogg'
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
attack_verb = list("stubbed", "poked")
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/extended = 0
|
||||
@@ -302,7 +302,7 @@
|
||||
throwforce = 5
|
||||
icon_state = "switchblade"
|
||||
attack_verb = list("stubbed", "poked")
|
||||
hitsound = 'sound/weapons/Genhit.ogg'
|
||||
hitsound = 'sound/weapons/genhit.ogg'
|
||||
sharpness = IS_BLUNT
|
||||
|
||||
/obj/item/weapon/switchblade/suicide_act(mob/user)
|
||||
@@ -440,6 +440,11 @@
|
||||
origin_tech = "engineering=3;combat=3;biotech=3"
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/melee/chainofcommand/tailwhip/kitty
|
||||
name = "cat o' nine tails"
|
||||
desc = "A whip fashioned from the severed tails of cats."
|
||||
icon_state = "catwhip"
|
||||
|
||||
/obj/item/weapon/melee/skateboard
|
||||
name = "skateboard"
|
||||
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
|
||||
@@ -494,7 +499,7 @@
|
||||
user.visible_message("<span class='userdanger'>It's a home run!</span>")
|
||||
target.throw_at(throw_target, rand(8,10), 14, user)
|
||||
target.ex_act(2)
|
||||
playsound(get_turf(src), 'sound/weapons/HOMERUN.ogg', 100, 1)
|
||||
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
|
||||
homerun_ready = 0
|
||||
return
|
||||
else if(!target.anchored)
|
||||
@@ -551,3 +556,12 @@
|
||||
bug.death(1)
|
||||
else
|
||||
qdel(target)
|
||||
|
||||
/obj/item/weapon/circlegame
|
||||
name = "circled hand"
|
||||
desc = "If somebody looks at this while it's below your waist, you get to bop them."
|
||||
icon_state = "madeyoulook"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
flags = DROPDEL | ABSTRACT
|
||||
attack_verb = list("bopped")
|
||||
|
||||
Reference in New Issue
Block a user