mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Move all the non-weapons out of code/game/objects/weapons (#29820)
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
/obj/item/storage/bible
|
||||
name = "bible"
|
||||
desc = "Apply to head repeatedly."
|
||||
lefthand_file = 'icons/mob/inhands/religion_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/religion_righthand.dmi'
|
||||
icon_state ="bible"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
resistance_flags = FIRE_PROOF
|
||||
drop_sound = 'sound/items/handling/book_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/book_pickup.ogg'
|
||||
var/mob/affecting = null
|
||||
var/deity_name = "Christ"
|
||||
/// Is the sprite of this bible customisable
|
||||
var/customisable = FALSE
|
||||
|
||||
/// Associative list of accociative lists of bible variants, used for the radial menu
|
||||
var/static/list/bible_variants = list(
|
||||
"Bible" = list("state" = "bible", "inhand" = "bible"),
|
||||
"Koran" = list("state" = "koran", "inhand" = "koran"),
|
||||
"Scrapbook" = list("state" = "scrapbook", "inhand" = "scrapbook"),
|
||||
"Creeper" = list("state" = "creeper", "inhand" = "generic_bible"),
|
||||
"White Bible" = list("state" = "white", "inhand" = "generic_bible"),
|
||||
"Holy Light" = list("state" = "holylight", "inhand" = "generic_bible"),
|
||||
"PlainRed" = list("state" = "athiest", "inhand" = "generic_bible"),
|
||||
"Tome" = list("state" = "tome", "inhand" = "generic_bible"),
|
||||
"The King in Yellow" = list("state" = "kingyellow", "inhand" = "kingyellow"),
|
||||
"Ithaqua" = list("state" = "ithaqua", "inhand" = "ithaqua"),
|
||||
"Scientology" = list("state" = "scientology", "inhand" = "scientology"),
|
||||
"the bible melts" = list("state" = "melted", "inhand" = "melted"),
|
||||
"Necronomicon" = list("state" = "necronomicon", "inhand" = "necronomicon"),
|
||||
"Greentext" = list("state" = "greentext", "inhand" = "greentext"),
|
||||
"Honkmother" = list("state" = "honk", "inhand" = "honk"),
|
||||
"Silentfather" = list("state" = "mime", "inhand" = "mime"),
|
||||
"Clockwork" = list("state" = "clock_bible", "inhand" = "clock_bible"),
|
||||
"Nanotrasen" = list("state" = "nanotrasen", "inhand" = "nanotrasen")
|
||||
)
|
||||
|
||||
/obj/item/storage/bible/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] stares into [name] and attempts to transcend understanding of the universe!</span>")
|
||||
user.dust()
|
||||
return OBLITERATION
|
||||
|
||||
/obj/item/storage/bible/fart_act(mob/living/M)
|
||||
if(QDELETED(M) || M.stat == DEAD)
|
||||
return
|
||||
M.visible_message("<span class='danger'>[M] farts on \the [name]!</span>")
|
||||
M.visible_message("<span class='userdanger'>A mysterious force smites [M]!</span>")
|
||||
M.suiciding = TRUE
|
||||
do_sparks(3, 1, M)
|
||||
M.gib()
|
||||
return TRUE // Don't run the fart emote
|
||||
|
||||
/obj/item/storage/bible/booze
|
||||
desc = "To be applied to the head repeatedly."
|
||||
|
||||
/obj/item/storage/bible/booze/populate_contents()
|
||||
new /obj/item/reagent_containers/drinks/bottle/beer(src)
|
||||
new /obj/item/reagent_containers/drinks/bottle/beer(src)
|
||||
new /obj/item/stack/spacecash(src)
|
||||
new /obj/item/stack/spacecash(src)
|
||||
new /obj/item/stack/spacecash(src)
|
||||
//BS12 EDIT
|
||||
// All cult functionality moved to Null Rod
|
||||
/obj/item/storage/bible/proc/bless(mob/living/carbon/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.heal_overall_damage(10, 10)
|
||||
return
|
||||
|
||||
/obj/item/storage/bible/attack__legacy__attackchain(mob/living/M, mob/living/user)
|
||||
add_attack_logs(user, M, "Hit with [src]")
|
||||
|
||||
if(!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey")
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(!HAS_MIND_TRAIT(user, TRAIT_HOLY))
|
||||
to_chat(user, "<span class='warning'>The book sizzles in your hands.</span>")
|
||||
user.take_organ_damage(0, 10)
|
||||
return
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(40 SECONDS)
|
||||
return
|
||||
|
||||
if(M.stat != DEAD && ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(prob(60))
|
||||
bless(H)
|
||||
H.visible_message("<span class='danger'>[user] heals [H == user ? "[user.p_themselves()]" : "[H]"] with the power of [deity_name]!</span>",
|
||||
"<span class='danger'>May the power of [deity_name] compel you to be healed!</span>")
|
||||
playsound(loc, "punch", 25, TRUE, -1)
|
||||
else
|
||||
M.adjustBrainLoss(10)
|
||||
to_chat(M, "<span class='warning'>You feel dumber.</span>")
|
||||
H.visible_message("<span class='danger'>[user] beats [H == user ? "[user.p_themselves()]" : "[H]"] over the head with [src]!</span>")
|
||||
playsound(src.loc, "punch", 25, TRUE, -1)
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>")
|
||||
playsound(src.loc, "punch", 25, TRUE, -1)
|
||||
|
||||
|
||||
/obj/item/storage/bible/afterattack__legacy__attackchain(atom/target, mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(isfloorturf(target))
|
||||
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
|
||||
if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
|
||||
for(var/obj/O in target)
|
||||
O.cult_reveal()
|
||||
if(istype(target, /obj/machinery/door/airlock))
|
||||
to_chat(user, "<span class='notice'>You hit the airlock with the bible.</span>")
|
||||
if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
|
||||
var/obj/airlock = target
|
||||
airlock.cult_reveal()
|
||||
|
||||
if(HAS_MIND_TRAIT(user, TRAIT_HOLY) && target.reagents)
|
||||
if(target.reagents.has_reagent("water")) //blesses all the water in the holder
|
||||
to_chat(user, "<span class='notice'>You bless [target].</span>")
|
||||
var/water2holy = target.reagents.get_reagent_amount("water")
|
||||
target.reagents.del_reagent("water")
|
||||
target.reagents.add_reagent("holywater", water2holy)
|
||||
|
||||
if(target.reagents.has_reagent("unholywater")) //yeah yeah, copy pasted code - sue me
|
||||
to_chat(user, "<span class='notice'>You purify [target].</span>")
|
||||
var/unholy2clean = target.reagents.get_reagent_amount("unholywater")
|
||||
target.reagents.del_reagent("unholywater")
|
||||
target.reagents.add_reagent("holywater", unholy2clean)
|
||||
|
||||
/obj/item/storage/bible/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
if(!customisable || !HAS_MIND_TRAIT(user, TRAIT_HOLY))
|
||||
return
|
||||
|
||||
var/list/skins = list()
|
||||
for(var/I in bible_variants)
|
||||
var/icons = bible_variants[I] // Get the accociated list
|
||||
var/image/bible_image = image('icons/obj/storage.dmi', icon_state = icons["state"])
|
||||
skins[I] = bible_image
|
||||
|
||||
var/choice = show_radial_menu(user, src, skins, null, 40, CALLBACK(src, PROC_REF(radial_check), user), TRUE)
|
||||
if(!choice || !radial_check(user))
|
||||
return
|
||||
var/choice_icons = bible_variants[choice]
|
||||
|
||||
icon_state = choice_icons["state"]
|
||||
item_state = choice_icons["inhand"]
|
||||
customisable = FALSE
|
||||
|
||||
// Carpet symbol icons are currently broken, so commented out until it's fixed
|
||||
/*var/carpet_dir
|
||||
switch(choice)
|
||||
if("Bible")
|
||||
carpet_dir = 2
|
||||
if("Koran")
|
||||
carpet_dir = 4
|
||||
if("Scientology")
|
||||
carpet_dir = 8
|
||||
if(carpet_dir)
|
||||
for(var/area/station/service/chapel/main/A in world)
|
||||
for(var/turf/T in A.contents)
|
||||
if(T.icon_state == "carpetsymbol")
|
||||
T.dir = carpet_dir*/
|
||||
|
||||
SSblackbox.record_feedback("text", "religion_book", 1, "[choice]", 1)
|
||||
|
||||
if(SSticker)
|
||||
SSticker.Bible_name = name
|
||||
SSticker.Bible_icon_state = icon_state
|
||||
SSticker.Bible_item_state = item_state
|
||||
|
||||
/obj/item/storage/bible/proc/radial_check(mob/user)
|
||||
if(!HAS_MIND_TRAIT(user, TRAIT_HOLY) || !ishuman(user))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!src || !H.is_in_hands(src) || H.incapacitated())
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/bible/syndi
|
||||
name = "suspicious bible"
|
||||
desc = "For treading the line between cultist, contraband, and a hostile corporation."
|
||||
icon_state = "syndi"
|
||||
@@ -0,0 +1,500 @@
|
||||
/*
|
||||
* 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
|
||||
* Crayon Box
|
||||
* Cigarette Box
|
||||
* Vial Box
|
||||
* Aquatic Starter Kit
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type
|
||||
|
||||
/obj/item/storage/fancy/update_icon_state()
|
||||
icon_state = "[icon_type]box[length(contents)]"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
. = ..()
|
||||
. += fancy_storage_examine(user)
|
||||
|
||||
/obj/item/storage/fancy/proc/fancy_storage_examine(mob/user)
|
||||
. = list()
|
||||
if(in_range(user, src))
|
||||
var/len = LAZYLEN(contents)
|
||||
if(len <= 0)
|
||||
. += "There are no [icon_type]s left in the box."
|
||||
else if(len == 1)
|
||||
. += "There is one [icon_type] left in the box."
|
||||
else
|
||||
. += "There are [length(contents)] [icon_type]s in the box."
|
||||
|
||||
/obj/item/storage/fancy/remove_from_storage(obj/item/I, atom/new_location)
|
||||
if(!istype(I))
|
||||
return FALSE
|
||||
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
// MARK: Donut Box
|
||||
/obj/item/storage/fancy/donut_box
|
||||
name = "donut box"
|
||||
desc = "\"To do, or do nut, the choice is obvious.\""
|
||||
icon_type = "donut"
|
||||
icon_state = "donutbox"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/food/donut)
|
||||
foldable = /obj/item/stack/sheet/cardboard
|
||||
foldable_amt = 1
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_overlays()
|
||||
. = ..()
|
||||
for(var/I = 1 to length(contents))
|
||||
var/obj/item/food/donut/donut = contents[I]
|
||||
var/icon/new_donut_icon = icon('icons/obj/food/containers.dmi', "[(I - 1)]donut[donut.donut_sprite_type]")
|
||||
. += new_donut_icon
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/donut_box/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/food/donut(src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/fancy/donut_box/empty/populate_contents()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/donut_box/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(isdrone(user) && !length(contents))
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
// MARK: Egg Box
|
||||
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
item_state = "eggbox"
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/food/egg)
|
||||
|
||||
/obj/item/storage/fancy/egg_box/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/food/egg(src)
|
||||
|
||||
// MARK: Candle Box
|
||||
/obj/item/storage/fancy/candle_box
|
||||
name = "Candle pack"
|
||||
desc = "A pack of red candles."
|
||||
icon = 'icons/obj/candle.dmi'
|
||||
icon_state = "candlebox0"
|
||||
icon_type = "candle"
|
||||
item_state = "candlebox5"
|
||||
storage_slots = 5
|
||||
throwforce = 2
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/storage/fancy/candle_box/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/storage/fancy/candle_box/full/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/candle(src)
|
||||
|
||||
/obj/item/storage/fancy/candle_box/eternal
|
||||
name = "Eternal Candle pack"
|
||||
desc = "A pack of red candles made with a special wax."
|
||||
|
||||
/obj/item/storage/fancy/candle_box/eternal/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/candle/eternal(src)
|
||||
|
||||
|
||||
// MARK: Crayon Box
|
||||
/obj/item/storage/fancy/crayons
|
||||
name = "box of crayons"
|
||||
desc = "A box of crayons for all your rune drawing needs."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonbox"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 8
|
||||
icon_type = "crayon"
|
||||
can_hold = list(
|
||||
/obj/item/toy/crayon
|
||||
)
|
||||
|
||||
/obj/item/storage/fancy/crayons/populate_contents()
|
||||
new /obj/item/toy/crayon/white(src)
|
||||
new /obj/item/toy/crayon/red(src)
|
||||
new /obj/item/toy/crayon/orange(src)
|
||||
new /obj/item/toy/crayon/yellow(src)
|
||||
new /obj/item/toy/crayon/green(src)
|
||||
new /obj/item/toy/crayon/blue(src)
|
||||
new /obj/item/toy/crayon/purple(src)
|
||||
new /obj/item/toy/crayon/black(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/crayons/update_overlays()
|
||||
. = ..()
|
||||
. += image('icons/obj/crayons.dmi',"crayonbox")
|
||||
for(var/obj/item/toy/crayon/crayon in contents)
|
||||
. += image('icons/obj/crayons.dmi', crayon.dye_color)
|
||||
|
||||
/obj/item/storage/fancy/crayons/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
switch(C.dye_color)
|
||||
if("mime")
|
||||
to_chat(usr, "This crayon is too sad to be contained in this box.")
|
||||
return
|
||||
if("rainbow")
|
||||
to_chat(usr, "This crayon is too powerful to be contained in this box.")
|
||||
return
|
||||
..()
|
||||
|
||||
/*
|
||||
* Matches Box
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/matches
|
||||
name = "matchbox"
|
||||
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "matchbox"
|
||||
item_state = "matchbox"
|
||||
base_icon_state = "matchbox"
|
||||
storage_slots = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
max_w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
drop_sound = 'sound/items/handling/matchbox_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/matchbox_pickup.ogg'
|
||||
can_hold = list(/obj/item/match)
|
||||
|
||||
/obj/item/storage/fancy/matches/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/match(src)
|
||||
|
||||
/obj/item/storage/fancy/matches/attackby__legacy__attackchain(obj/item/match/W, mob/user, params)
|
||||
if(istype(W, /obj/item/match) && !W.lit)
|
||||
W.matchignite()
|
||||
playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, TRUE)
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/matches/update_icon_state()
|
||||
. = ..()
|
||||
switch(length(contents))
|
||||
if(10)
|
||||
icon_state = base_icon_state
|
||||
if(5 to 9)
|
||||
icon_state = "[base_icon_state]_almostfull"
|
||||
if(1 to 4)
|
||||
icon_state = "[base_icon_state]_almostempty"
|
||||
if(0)
|
||||
icon_state = "[base_icon_state]_e"
|
||||
|
||||
// MARK: Cigarette Pack
|
||||
/obj/item/storage/fancy/cigarettes
|
||||
name = "generic cigarette packet"
|
||||
desc = "An abstract brand of cigarette that should not exist. Make a GitHub report if you see this."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "robust_packet"
|
||||
item_state = "robust_packet"
|
||||
belt_icon = "patch_pack"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
storage_slots = 6
|
||||
max_combined_w_class = 6
|
||||
can_hold = list(/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/lighter,
|
||||
/obj/item/match)
|
||||
cant_hold = list(/obj/item/clothing/mask/cigarette/cigar,
|
||||
/obj/item/clothing/mask/cigarette/pipe,
|
||||
/obj/item/lighter/zippo)
|
||||
icon_type = "cigarette"
|
||||
var/cigarette_slogan = "The preferred brand of coders and developers."
|
||||
var/cigarette_type = /obj/item/clothing/mask/cigarette
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/examine(mob/user)
|
||||
. = ..()
|
||||
if(cigarette_slogan)
|
||||
. += "<span class='notice'>\"[cigarette_slogan]\"</span>"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new cigarette_type(src)
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_[length(contents)]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack__legacy__attackchain(mob/living/carbon/M, mob/living/user)
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(istype(M) && user.zone_selected == "mouth" && length(contents) > 0 && !M.wear_mask)
|
||||
var/got_cig = FALSE
|
||||
for(var/num in 1 to length(contents))
|
||||
var/obj/item/I = contents[num]
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/C = I
|
||||
M.equip_to_slot_if_possible(C, ITEM_SLOT_MASK)
|
||||
if(M != user)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] takes \a [C.name] out of [src] and gives it to [M].</span>",
|
||||
"<span class='notice'>You take \a [C.name] out of [src] and give it to [M].</span>"
|
||||
)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You take \a [C.name] out of the pack.</span>")
|
||||
update_icon()
|
||||
got_cig = TRUE
|
||||
break
|
||||
if(!got_cig)
|
||||
to_chat(user, "<span class='warning'>There are no smokables in the pack!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/can_be_inserted(obj/item/W, stop_messages = FALSE)
|
||||
if(istype(W, /obj/item/match))
|
||||
var/obj/item/match/M = W
|
||||
if(M.lit)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='notice'>Putting a lit [W] in [src] probably isn't a good idea.</span>")
|
||||
return FALSE
|
||||
if(istype(W, /obj/item/lighter))
|
||||
var/obj/item/lighter/L = W
|
||||
if(L.lit)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='notice'>Putting [W] in [src] while lit probably isn't a good idea.</span>")
|
||||
return FALSE
|
||||
//if we get this far, handle the insertion checks as normal
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(isdrone(user) && !length(contents))
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Smoked mainly by spacers. The somewhat fishy notes are an acquired taste. \
|
||||
Has a light, low-tar smoke specifically designed to reduce stress on scrubber systems."
|
||||
icon_state = "carp_packet"
|
||||
item_state = "carp_packet"
|
||||
cigarette_slogan = "Carp smokers would rather bite you than switch, since 2313."
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "An infamous brand, DromedaryCo cigarettes are unfiltered, tarry, and have a very harsh flavour. \
|
||||
Not for beginner smokers. Enjoyed mainly by gruff types with equally gruff voices."
|
||||
icon_state = "D_packet"
|
||||
item_state = "D_packet"
|
||||
cigarette_slogan = "Wouldn't a slow death make a change?"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_random
|
||||
name ="\improper Embellished Enigma packet"
|
||||
desc = "True to the name, Enigmas are impossible to pin down. \
|
||||
No two cigarettes are alike as each one is infused with unique flavours and substances, so every time is just like your first time."
|
||||
icon_state = "enigma_packet"
|
||||
item_state = "enigma_packet"
|
||||
cigarette_slogan = "For the true connoisseur of exotic flavors."
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/random
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_random/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class = 'warning'>Warning: Not all substances used have undergone regulatory testing, smoke at your own risk. \
|
||||
The Embellished Enigma Tobacco Company does not accept liability for proper or negligent use of its products. Consult your doctor before use.</span>"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "Whilst you cannot decipher what the strange runes on the packet say, it bears the unmistakable scent of cannabis."
|
||||
icon_state = "midori_packet"
|
||||
item_state = "midori_packet"
|
||||
cigarette_slogan = ""
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/rollie
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_our_brand
|
||||
name = "\improper Our Brand packet" // This brand name is an obscure reference to The Master and Margarita by Ivan Bezdomny.
|
||||
desc = "The one, official brand of cigarette manufactured by the Vostran Iron Republic - one of the main constitient nations of the USSP. \
|
||||
Exported across the known Orion Spur by members of the USSP's trading bloc and vendors affiliated with the Nian Merchant Guild. \
|
||||
The flavour is acrid, the smoke is thin and wispy, yet harsh on the throat. The only redeeming features are the high nicotine content and the low price."
|
||||
icon_state = "our_brand_packet"
|
||||
item_state = "our_brand_packet"
|
||||
cigarette_slogan = "Smoke, for the Union!"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Nanotrasen's in-house brand of cigarettes. Cheap quality, wispy smoke, has a somewhat harsh flavour."
|
||||
cigarette_slogan = "Smoked by the robust."
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Nanotrasen's premium cigarette offering. Has a smooth, drawn-out flavour and a dense smoke. Contains real gold."
|
||||
icon_state = "robust_g_packet"
|
||||
item_state = "robust_g_packet"
|
||||
cigarette_slogan = "Smoked by the <b>truly</b> robust."
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/robustgold
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_candy
|
||||
name = "\improper Robust Junior packet"
|
||||
desc = "A packet of nicotine-free* candy cigarettes, manufactured by Robust Tobacco."
|
||||
cigarette_slogan = "Unsure about smoking? Want to bring your children safely into the family tradition? Look no more with this special packet! Includes 100% nicotine-free* candy cigarettes."
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/candy
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_candy/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class = 'warning'>*Warning: Do not expose to high temperatures or naked flames, contains additives that will form nicotine at high temperatures.</span>"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name ="\improper Shady Jim's Super Slims packet"
|
||||
desc = "Despite the doubious appearance, these cigarettes do exactly what they say on the box. The smoke tastes like cheap berry juice and battery acid, with a bitter chemical aftertaste."
|
||||
icon_state = "shady_jim_packet"
|
||||
item_state = "shady_jim_packet"
|
||||
cigarette_slogan = "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!"
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_solar_rays
|
||||
name = "\improper Solar Rays packet"
|
||||
desc = "A popular brand within the Trans-Solar Federation, they have a smooth, slightly cinnamon flavour. \
|
||||
Whilst not actually state-owned, these cigarettes lean heavily into patriotic marketing, and are included in federal ration packs as a morale booster."
|
||||
icon_state = "solar_packet"
|
||||
item_state = "solar_packet"
|
||||
cigarette_slogan = "Smoked by true patriots."
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "One of the most popular brands in the Orion Sector, flavoured with menthol to give a smooth cooling sensation with every puff."
|
||||
icon_state = "uplift_packet"
|
||||
item_state = "uplift_packet"
|
||||
cigarette_slogan = "Sit back and relax with the soft cooling embrace that only an Uplift can provide."
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/menthol
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_med
|
||||
name = "medical marijuana packet"
|
||||
desc = "A prescription packet containing six fully legal medical marijuana cigarettes. \
|
||||
Made using a strain of cannabis engineered to maximise CBD content and eliminate THC, much to the chagrin of stoners everywhere."
|
||||
icon_state = "med_packet"
|
||||
item_state = "med_packet"
|
||||
cigarette_slogan = "All the medical benefits, with none of the high!"
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/medical_marijuana
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "suspicious cigarette packet"
|
||||
desc = "An obscure brand of evil-looking cigarettes. Smells like Donk pockets."
|
||||
icon_state = "syndie_packet"
|
||||
item_state = "syndie_packet"
|
||||
cigarette_slogan = "Strong flavour, dense smoke, infused with omnizine."
|
||||
cigarette_type = /obj/item/clothing/mask/cigarette/syndicate
|
||||
|
||||
/obj/item/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"
|
||||
item_state = "cig_paper_pack"
|
||||
storage_slots = 10
|
||||
icon_type = "rolling paper"
|
||||
can_hold = list(/obj/item/rollingpaper)
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/rollingpaper(src)
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_overlays()
|
||||
. = ..()
|
||||
if(!length(contents))
|
||||
. += "[icon_state]_empty"
|
||||
|
||||
|
||||
// MARK: Vial Box
|
||||
/obj/item/storage/fancy/vials
|
||||
icon = 'icons/obj/vialbox.dmi'
|
||||
icon_state = "vialbox6"
|
||||
icon_type = "vial"
|
||||
name = "vial storage box"
|
||||
storage_slots = 6
|
||||
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial)
|
||||
|
||||
|
||||
/obj/item/storage/fancy/vials/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/reagent_containers/glass/beaker/vial(src)
|
||||
return
|
||||
|
||||
/obj/item/storage/lockbox/vials
|
||||
name = "secure vial storage box"
|
||||
desc = "A locked box for keeping things away from children."
|
||||
icon = 'icons/obj/vialbox.dmi'
|
||||
icon_state = "vialbox0"
|
||||
can_hold = list(/obj/item/reagent_containers/glass/bottle)
|
||||
storage_slots = 6
|
||||
req_access = list(ACCESS_VIROLOGY)
|
||||
|
||||
/obj/item/storage/lockbox/vials/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/lockbox/vials/update_icon_state()
|
||||
icon_state = "vialbox[length(contents)]"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/lockbox/vials/update_overlays()
|
||||
. = ..()
|
||||
if(!broken)
|
||||
. += "led[locked]"
|
||||
if(locked)
|
||||
. += "cover"
|
||||
else
|
||||
. += "ledb"
|
||||
|
||||
/obj/item/storage/lockbox/vials/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/lockbox/vials/zombie_cure
|
||||
name = "secure vial storage box - 'Anti-Plague Sequences'"
|
||||
|
||||
/obj/item/storage/lockbox/vials/zombie_cure/populate_contents()
|
||||
new /obj/item/reagent_containers/glass/bottle/zombiecure1(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/zombiecure2(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/zombiecure3(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/zombiecure4(src)
|
||||
|
||||
// MARK: Aquatic Starter Kit
|
||||
/obj/item/storage/firstaid/aquatic_kit
|
||||
name = "aquatic starter kit"
|
||||
desc = "It's a starter kit box for an aquarium."
|
||||
icon_state = "AquaticKit"
|
||||
med_bot_skin = "fish"
|
||||
|
||||
/obj/item/storage/firstaid/aquatic_kit/full
|
||||
desc = "It's a starter kit for an aquarium; includes 1 tank brush, 1 egg scoop, 1 fish net, 1 container of fish food and 1 fish bag."
|
||||
|
||||
/obj/item/storage/firstaid/aquatic_kit/full/populate_contents()
|
||||
new /obj/item/egg_scoop(src)
|
||||
new /obj/item/fish_net(src)
|
||||
new /obj/item/tank_brush(src)
|
||||
new /obj/item/fishfood(src)
|
||||
new /obj/item/storage/bag/fish(src)
|
||||
@@ -0,0 +1,437 @@
|
||||
/* First aid storage
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
* First Aid Kits
|
||||
*/
|
||||
/obj/item/storage/firstaid
|
||||
name = "generic first-aid kit"
|
||||
desc = "If you can see this, make a bug report on GitHub, something went wrong!"
|
||||
icon_state = "genericfirstaid"
|
||||
throw_range = 8
|
||||
req_one_access =list(ACCESS_MEDICAL, ACCESS_ROBOTICS) //Access and treatment are utilized for medbots.
|
||||
var/treatment_brute = "salglu_solution"
|
||||
var/treatment_oxy = "salbutamol"
|
||||
var/treatment_fire = "salglu_solution"
|
||||
var/treatment_tox = "charcoal"
|
||||
var/treatment_virus = "spaceacillin"
|
||||
var/med_bot_skin = null
|
||||
var/syndicate_aligned = FALSE
|
||||
var/robot_arm // This is for robot construction
|
||||
|
||||
|
||||
/obj/item/storage/firstaid/regular
|
||||
name = "first-aid kit"
|
||||
desc = "A general medical kit that contains medical patches for both brute damage and burn damage. Also contains an epinephrine syringe for emergency use and a health analyzer."
|
||||
icon_state = "firstaid"
|
||||
|
||||
/obj/item/storage/firstaid/regular/populate_contents()
|
||||
new /obj/item/reagent_containers/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
|
||||
|
||||
/obj/item/storage/firstaid/regular/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/regular/doctor
|
||||
desc = "A medical kit designed for Nanotrasen medical personnel."
|
||||
|
||||
/obj/item/storage/firstaid/regular/doctor/populate_contents()
|
||||
new /obj/item/reagent_containers/applicator/brute(src)
|
||||
new /obj/item/reagent_containers/applicator/burn(src)
|
||||
new /obj/item/reagent_containers/patch/styptic(src)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
new /obj/item/healthanalyzer/advanced(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
|
||||
|
||||
/obj/item/storage/firstaid/fire
|
||||
name = "fire first-aid kit"
|
||||
desc = "A medical kit that contains several medical patches and pills for treating burns. Contains one epinephrine syringe for emergency use and a health analyzer."
|
||||
icon_state = "ointment"
|
||||
item_state = "firstaid-ointment"
|
||||
med_bot_skin = "ointment"
|
||||
|
||||
/obj/item/storage/firstaid/fire/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("ointment", "firefirstaid")
|
||||
|
||||
/obj/item/storage/firstaid/fire/populate_contents()
|
||||
new /obj/item/reagent_containers/applicator/burn(src)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf/small(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
|
||||
/obj/item/storage/firstaid/fire/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/toxin
|
||||
name = "toxin first aid kit"
|
||||
desc = "A medical kit designed to counter poisoning by common toxins. Contains three pills and syringes, and a health analyzer to determine the health of the patient."
|
||||
icon_state = "antitoxin"
|
||||
item_state = "firstaid-toxin"
|
||||
med_bot_skin = "tox"
|
||||
|
||||
/obj/item/storage/firstaid/toxin/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("antitoxin", "antitoxfirstaid", "antitoxfirstaid2")
|
||||
|
||||
/obj/item/storage/firstaid/toxin/populate_contents()
|
||||
for(var/I in 1 to 3)
|
||||
new /obj/item/reagent_containers/syringe/charcoal(src)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/toxin/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/o2
|
||||
name = "oxygen deprivation first aid kit"
|
||||
desc = "A first aid kit that contains four pills of salbutamol, which is able to counter injuries caused by suffocation. Also contains a health analyzer to determine the health of the patient."
|
||||
icon_state = "o2"
|
||||
item_state = "firstaid-o2"
|
||||
med_bot_skin = "o2"
|
||||
|
||||
/obj/item/storage/firstaid/o2/populate_contents()
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/o2/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/brute
|
||||
name = "brute trauma treatment kit"
|
||||
desc = "A medical kit that contains several medical patches and pills for treating brute injuries. Contains one epinephrine syringe for emergency use and a health analyzer."
|
||||
icon_state = "brute"
|
||||
item_state = "firstaid-brute"
|
||||
med_bot_skin = "brute"
|
||||
|
||||
/obj/item/storage/firstaid/brute/Initialize(mapload)
|
||||
. = ..()
|
||||
icon_state = pick("brute", "brute2")
|
||||
|
||||
/obj/item/storage/firstaid/brute/populate_contents()
|
||||
new /obj/item/reagent_containers/applicator/brute(src)
|
||||
new /obj/item/reagent_containers/patch/styptic/small(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
|
||||
/obj/item/storage/firstaid/brute/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/adv
|
||||
name = "advanced first-aid kit"
|
||||
desc = "Contains advanced medical treatments."
|
||||
icon_state = "advfirstaid"
|
||||
item_state = "firstaid-advanced"
|
||||
med_bot_skin = "adv"
|
||||
|
||||
/obj/item/storage/firstaid/adv/populate_contents()
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
|
||||
new /obj/item/healthanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/adv/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/machine
|
||||
name = "machine repair kit"
|
||||
desc = "A kit that contains supplies to repair IPCs on the go."
|
||||
icon_state = "machinefirstaid"
|
||||
item_state = "firstaid-machine"
|
||||
med_bot_skin = "machine"
|
||||
|
||||
/obj/item/storage/firstaid/machine/populate_contents()
|
||||
new /obj/item/weldingtool/mini(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
new /obj/item/stack/cable_coil(src)
|
||||
new /obj/item/robotanalyzer(src)
|
||||
|
||||
/obj/item/storage/firstaid/machine/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/tactical
|
||||
name = "first-aid kit"
|
||||
desc = "I hope you've got insurance."
|
||||
icon_state = "bezerk"
|
||||
treatment_oxy = "perfluorodecalin"
|
||||
treatment_brute = "bicaridine"
|
||||
treatment_fire = "kelotane"
|
||||
req_one_access = list(ACCESS_SYNDICATE)
|
||||
med_bot_skin = "bezerk"
|
||||
syndicate_aligned = TRUE
|
||||
|
||||
/obj/item/storage/firstaid/tactical/populate_contents()
|
||||
new /obj/item/reagent_containers/hypospray/combat(src)
|
||||
new /obj/item/reagent_containers/applicator/dual/syndi(src) // Because you ain't got no time to look at what damage dey taking yo
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/emergency_nuclear(src)
|
||||
new /obj/item/reagent_containers/hypospray/autoinjector/emergency_nuclear(src)
|
||||
new /obj/item/storage/pill_bottle/painkillers(src)
|
||||
new /obj/item/clothing/glasses/hud/health/night(src)
|
||||
new /obj/item/healthanalyzer/advanced(src)
|
||||
|
||||
/obj/item/storage/firstaid/tactical/empty/populate_contents()
|
||||
return
|
||||
|
||||
/obj/item/storage/firstaid/surgery
|
||||
name = "field surgery kit"
|
||||
desc = "A kit for surgery in the field."
|
||||
icon_state = "duffel-med"
|
||||
lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
|
||||
max_w_class = WEIGHT_CLASS_BULKY
|
||||
max_combined_w_class = 21
|
||||
storage_slots = 10
|
||||
can_hold = list(/obj/item/roller,/obj/item/bonesetter,/obj/item/bonegel, /obj/item/scalpel, /obj/item/hemostat,
|
||||
/obj/item/cautery, /obj/item/retractor, /obj/item/fix_o_vein, /obj/item/surgicaldrill, /obj/item/circular_saw)
|
||||
|
||||
/obj/item/storage/firstaid/surgery/populate_contents()
|
||||
new /obj/item/roller(src)
|
||||
new /obj/item/bonesetter(src)
|
||||
new /obj/item/bonegel(src)
|
||||
new /obj/item/scalpel(src)
|
||||
new /obj/item/hemostat(src)
|
||||
new /obj/item/cautery(src)
|
||||
new /obj/item/retractor(src)
|
||||
new /obj/item/fix_o_vein(src)
|
||||
new /obj/item/surgicaldrill(src)
|
||||
new /obj/item/circular_saw(src)
|
||||
|
||||
/obj/item/storage/firstaid/ert
|
||||
name = "ert first-aid kit"
|
||||
desc = "A medical kit used by Nanotrasen emergency response team personnel."
|
||||
icon_state = "bezerk"
|
||||
med_bot_skin = "bezerk"
|
||||
|
||||
/obj/item/storage/firstaid/ert/populate_contents()
|
||||
new /obj/item/healthanalyzer/advanced(src)
|
||||
new /obj/item/stack/medical/splint(src)
|
||||
new /obj/item/reagent_containers/applicator/dual(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
|
||||
|
||||
/obj/item/storage/firstaid/ert_amber
|
||||
name = "amber ert first-aid kit"
|
||||
desc = "A medical kit used by Amber level emergency response team personnel."
|
||||
icon_state = "firstaid"
|
||||
|
||||
/obj/item/storage/firstaid/ert_amber/populate_contents()
|
||||
new /obj/item/healthanalyzer/advanced(src)
|
||||
new /obj/item/reagent_containers/applicator/brute(src)
|
||||
new /obj/item/reagent_containers/applicator/burn(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/storage/pill_bottle/ert_amber(src)
|
||||
new /obj/item/storage/pill_bottle/patch_pack/ert_amber(src)
|
||||
|
||||
/obj/item/storage/firstaid/fake_tactical
|
||||
name = "tactical first-aid kit"
|
||||
desc = "I hope you've got insurance. The paint is still wet."
|
||||
icon_state = "bezerk"
|
||||
med_bot_skin = "bezerk"
|
||||
|
||||
/obj/item/storage/firstaid/fake_tactical/populate_contents()
|
||||
return
|
||||
|
||||
/*
|
||||
* Pill Bottles
|
||||
*/
|
||||
|
||||
/obj/item/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"
|
||||
belt_icon = "pill_bottle"
|
||||
use_sound = "pillbottle"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/reagent_containers/pill)
|
||||
cant_hold = list(/obj/item/reagent_containers/patch)
|
||||
allow_quick_gather = TRUE
|
||||
use_to_pickup = TRUE
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 50
|
||||
display_contents_with_number = TRUE
|
||||
var/base_name = ""
|
||||
var/label_text = ""
|
||||
var/applying_meds = FALSE //To Prevent spam clicking and generating runtimes from apply a deleting pill multiple times.
|
||||
var/rapid_intake_message = "unscrews the cap on the pill bottle and begins dumping the entire contents down their throat!"
|
||||
var/rapid_post_instake_message = "downs the entire bottle of pills in one go!"
|
||||
/// Whether to render a coloured wrapper overlay on the icon.
|
||||
var/allow_wrap = TRUE
|
||||
/// The color of the wrapper overlay.
|
||||
var/wrapper_color = null
|
||||
/// The icon state of the wrapper overlay.
|
||||
var/wrapper_state = "pillbottle_wrap"
|
||||
|
||||
/obj/item/storage/pill_bottle/Initialize(mapload)
|
||||
. = ..()
|
||||
base_name = name
|
||||
if(allow_wrap)
|
||||
apply_wrap()
|
||||
|
||||
/obj/item/storage/pill_bottle/proc/apply_wrap()
|
||||
if(wrapper_color)
|
||||
overlays.Cut()
|
||||
var/image/I = image(icon, wrapper_state)
|
||||
I.color = wrapper_color
|
||||
overlays += I
|
||||
|
||||
/obj/item/storage/pill_bottle/attack__legacy__attackchain(mob/M, mob/user)
|
||||
if(iscarbon(M) && length(contents))
|
||||
if(applying_meds)
|
||||
to_chat(user, "<span class='warning'>You are already applying meds.</span>")
|
||||
return
|
||||
applying_meds = TRUE
|
||||
for(var/obj/item/reagent_containers/P in contents)
|
||||
if(P.mob_act(M, user))
|
||||
applying_meds = FALSE
|
||||
else
|
||||
applying_meds = FALSE
|
||||
break
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_red
|
||||
wrapper_color = COLOR_NT_RED
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_red/populate_contents()
|
||||
for(var/I in 1 to 6)
|
||||
new /obj/item/reagent_containers/pill/pentetic(src)
|
||||
new /obj/item/reagent_containers/pill/ironsaline(src)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
new /obj/item/reagent_containers/pill/mannitol(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_amber
|
||||
wrapper_color = COLOR_ORANGE
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_amber/populate_contents()
|
||||
for(var/I in 1 to 6)
|
||||
new /obj/item/reagent_containers/pill/salbutamol(src)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_gamma
|
||||
wrapper_color = COLOR_YELLOW_GRAY
|
||||
|
||||
/obj/item/storage/pill_bottle/ert_gamma/populate_contents()
|
||||
for(var/I in 1 to 6)
|
||||
new /obj/item/reagent_containers/pill/pentetic(src)
|
||||
new /obj/item/reagent_containers/pill/ironsaline(src)
|
||||
new /obj/item/reagent_containers/pill/hydrocodone(src)
|
||||
new /obj/item/reagent_containers/pill/mannitol(src)
|
||||
new /obj/item/reagent_containers/pill/lazarus_reagent(src)
|
||||
new /obj/item/reagent_containers/pill/rezadone(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/MouseDrop(obj/over_object) // Best utilized if you're a cantankerous doctor with a Vicodin habit.
|
||||
if(iscarbon(over_object))
|
||||
var/mob/living/carbon/C = over_object
|
||||
if(loc == C && src == C.get_active_hand())
|
||||
if(!length(contents))
|
||||
to_chat(C, "<span class='notice'>There is nothing in [src]!</span>")
|
||||
return
|
||||
C.visible_message("<span class='danger'>[C] [rapid_intake_message]</span>")
|
||||
if(do_mob(C, C, 100)) // 10 seconds
|
||||
for(var/obj/item/reagent_containers/pill/P in contents)
|
||||
P.interact_with_atom(C, C)
|
||||
C.visible_message("<span class='danger'>[C] [rapid_post_instake_message]</span>")
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/pill_bottle/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(is_pen(I))
|
||||
rename_interactive(user, I)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/pill_bottle/proc/apply_wrapper_color(color_number)
|
||||
var/static/list/colors = list(COLOR_RED, COLOR_ORANGE, COLOR_YELLOW, COLOR_GREEN, COLOR_CYAN_BLUE, COLOR_VIOLET, COLOR_PURPLE)
|
||||
wrapper_color = colors[(color_number - 1) % length(colors) + 1]
|
||||
apply_wrap()
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack
|
||||
name = "patch pack"
|
||||
desc = "It's a container for storing medical patches."
|
||||
icon_state = "patch_pack"
|
||||
belt_icon = "patch_pack"
|
||||
use_sound = "patchpack"
|
||||
can_hold = list(/obj/item/reagent_containers/patch)
|
||||
cant_hold = list()
|
||||
rapid_intake_message = "flips the lid of the patch pack open and begins rapidly stamping patches on themselves!"
|
||||
rapid_post_instake_message = "stamps the entire contents of the patch pack all over their entire body!"
|
||||
wrapper_state = "patch_pack_wrap"
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal
|
||||
name = "Pill bottle (Charcoal)"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
wrapper_color = COLOR_GREEN
|
||||
|
||||
/obj/item/storage/pill_bottle/charcoal/populate_contents()
|
||||
for(var/I in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/charcoal(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/painkillers
|
||||
name = "Pill Bottle (Salicylic Acid)"
|
||||
desc = "Contains various pills for minor pain relief."
|
||||
wrapper_color = COLOR_RED
|
||||
|
||||
/obj/item/storage/pill_bottle/painkillers/populate_contents()
|
||||
for(var/I in 1 to 8)
|
||||
new /obj/item/reagent_containers/pill/salicylic(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/fakedeath
|
||||
allow_wrap = FALSE
|
||||
|
||||
/obj/item/storage/pill_bottle/fakedeath/populate_contents()
|
||||
new /obj/item/reagent_containers/pill/fakedeath(src)
|
||||
new /obj/item/reagent_containers/pill/fakedeath(src)
|
||||
new /obj/item/reagent_containers/pill/fakedeath(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack/ert
|
||||
name = "ert red patch pack"
|
||||
desc = "A patch pack containing medical patches. Issued to Nanotrasen ERT Red level medics."
|
||||
wrapper_color = COLOR_NT_RED
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack/ert/populate_contents()
|
||||
for(var/I in 1 to 5)
|
||||
new /obj/item/reagent_containers/patch/perfluorodecalin(src)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf(src)
|
||||
new /obj/item/reagent_containers/patch/styptic(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack/ert/gamma
|
||||
name = "ert gamma patch pack"
|
||||
desc = "A patch pack containing medical patches. Issued to Nanotrasen ERT Gamma level medics."
|
||||
wrapper_color = COLOR_YELLOW_GRAY
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack/ert_amber
|
||||
name = "ert amber patch pack"
|
||||
desc = "A patch pack containing medical patches. Issued to Nanotrasen ERT Amber level medics"
|
||||
wrapper_color = COLOR_ORANGE
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack/ert_amber/populate_contents()
|
||||
for(var/I in 1 to 5)
|
||||
new /obj/item/reagent_containers/patch/silver_sulf/small(src)
|
||||
new /obj/item/reagent_containers/patch/styptic/small(src)
|
||||
@@ -0,0 +1,394 @@
|
||||
/obj/item/storage/bag/garment
|
||||
name = "garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes."
|
||||
icon_state = "garment_bag"
|
||||
slot_flags = NONE
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
display_contents_with_number = FALSE
|
||||
max_combined_w_class = 200
|
||||
storage_slots = 27
|
||||
resistance_flags = FLAMMABLE
|
||||
can_hold = list(/obj/item/clothing)
|
||||
cant_hold = list(
|
||||
/obj/item/storage,
|
||||
/obj/item/clothing/suit/space,
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/clothing/mask/facehugger, //Why would you do this
|
||||
/obj/item/clothing/accessory/medal,
|
||||
/obj/item/clothing/suit/armor/riot,
|
||||
/obj/item/clothing/suit/armor/reactive,
|
||||
/obj/item/clothing/suit/armor/laserproof,
|
||||
/obj/item/clothing/suit/hooded/ablative,
|
||||
/obj/item/clothing/gloves/color/black/krav_maga,
|
||||
)
|
||||
|
||||
/obj/item/storage/bag/garment/captain
|
||||
name = "captain's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the captain."
|
||||
|
||||
/obj/item/storage/bag/garment/captain/populate_contents()
|
||||
new /obj/item/clothing/head/caphat(src)
|
||||
new /obj/item/clothing/head/caphat/parade(src)
|
||||
new /obj/item/clothing/head/caphat/parade/white(src)
|
||||
new /obj/item/clothing/head/beret/captain(src)
|
||||
new /obj/item/clothing/head/beret/captain/white(src)
|
||||
new /obj/item/clothing/head/crown/fancy(src)
|
||||
new /obj/item/clothing/neck/cloak/captain(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/jacket(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/jacket/tunic(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/coat(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/coat/white(src)
|
||||
new /obj/item/clothing/neck/cloak/captain_mantle(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/under/rank/captain/skirt(src)
|
||||
new /obj/item/clothing/under/rank/captain/white(src)
|
||||
new /obj/item/clothing/under/rank/captain/skirt/white(src)
|
||||
new /obj/item/clothing/under/rank/captain/parade(src)
|
||||
new /obj/item/clothing/under/rank/captain/dress(src)
|
||||
new /obj/item/clothing/gloves/color/captain(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/captain(src)
|
||||
new /obj/item/clothing/under/plasmaman/captain(src)
|
||||
|
||||
/obj/item/storage/bag/garment/head_of_personnel
|
||||
name = "head of personnel's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the head of personnel."
|
||||
|
||||
/obj/item/storage/bag/garment/head_of_personnel/populate_contents()
|
||||
new /obj/item/clothing/head/hop(src)
|
||||
new /obj/item/clothing/head/beret/hop(src)
|
||||
new /obj/item/clothing/neck/cloak/head_of_personnel(src)
|
||||
new /obj/item/clothing/neck/cloak/hop_mantle(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/suit/hopcoat(src)
|
||||
new /obj/item/clothing/under/rank/civilian/hop(src)
|
||||
new /obj/item/clothing/under/rank/civilian/hop/skirt(src)
|
||||
new /obj/item/clothing/under/rank/civilian/hop/dress(src)
|
||||
new /obj/item/clothing/under/rank/civilian/hop/formal(src)
|
||||
new /obj/item/clothing/under/rank/civilian/hop/oldman(src)
|
||||
new /obj/item/clothing/under/suit/female(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/hop(src)
|
||||
new /obj/item/clothing/under/plasmaman/hop(src)
|
||||
|
||||
/obj/item/storage/bag/garment/head_of_security
|
||||
name = "head of security's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the head of security."
|
||||
|
||||
/obj/item/storage/bag/garment/head_of_security/populate_contents()
|
||||
new /obj/item/clothing/head/hos(src)
|
||||
new /obj/item/clothing/head/beret/hos(src)
|
||||
new /obj/item/clothing/neck/cloak/head_of_security(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/suit/armor/hos/alt(src)
|
||||
new /obj/item/clothing/neck/cloak/hos_mantle(src)
|
||||
new /obj/item/clothing/under/rank/security/head_of_security(src)
|
||||
new /obj/item/clothing/under/rank/security/formal/head_of_security(src)
|
||||
new /obj/item/clothing/under/rank/security/head_of_security/corporate(src)
|
||||
new /obj/item/clothing/under/rank/security/head_of_security/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/head_of_security/skirt/corporate(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/security/hos(src)
|
||||
new /obj/item/clothing/under/plasmaman/security/hos(src)
|
||||
|
||||
/obj/item/storage/bag/garment/research_director
|
||||
name = "research director's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the research director."
|
||||
|
||||
/obj/item/storage/bag/garment/research_director/populate_contents()
|
||||
new /obj/item/clothing/head/rd (src)
|
||||
new /obj/item/clothing/head/beret/rd(src)
|
||||
new /obj/item/clothing/neck/cloak/research_director(src)
|
||||
new /obj/item/clothing/under/rank/rnd/rd(src)
|
||||
new /obj/item/clothing/under/rank/rnd/rd/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/rd(src)
|
||||
new /obj/item/clothing/neck/cloak/rd_mantle(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/glasses/science(src)
|
||||
new /obj/item/clothing/glasses/welding/superior(src)
|
||||
new /obj/item/clothing/glasses/hud/diagnostic/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/rd(src)
|
||||
new /obj/item/clothing/under/plasmaman/rd(src)
|
||||
|
||||
|
||||
/obj/item/storage/bag/garment/chief_medical_officer
|
||||
name = "chief medical officer's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the chief medical officer."
|
||||
|
||||
/obj/item/storage/bag/garment/chief_medical_officer/populate_contents()
|
||||
new /obj/item/clothing/head/cmo (src)
|
||||
new /obj/item/clothing/head/beret/cmo (src)
|
||||
new /obj/item/clothing/head/surgery/blue(src)
|
||||
new /obj/item/clothing/head/surgery/green(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/neck/cloak/chief_medical_officer(src)
|
||||
new /obj/item/clothing/under/rank/medical/cmo(src)
|
||||
new /obj/item/clothing/under/rank/medical/cmo/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/scrubs(src)
|
||||
new /obj/item/clothing/under/rank/medical/scrubs/green(src)
|
||||
new /obj/item/clothing/under/rank/medical/scrubs/purple(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
|
||||
new /obj/item/clothing/neck/cloak/cmo_mantle(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/cmo(src)
|
||||
new /obj/item/clothing/under/plasmaman/cmo(src)
|
||||
|
||||
/obj/item/storage/bag/garment/chief_engineer
|
||||
name = "chief engineer's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the chief engineer."
|
||||
|
||||
/obj/item/storage/bag/garment/chief_engineer/populate_contents()
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/head/beret/ce(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/neck/cloak/chief_engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineering/chief_engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineering/chief_engineer/skirt(src)
|
||||
new /obj/item/clothing/neck/cloak/ce_mantle(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest/ce(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/glasses/welding/superior(src)
|
||||
new /obj/item/clothing/glasses/meson/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/engineering/ce(src)
|
||||
new /obj/item/clothing/under/plasmaman/engineering/ce(src)
|
||||
|
||||
/obj/item/storage/bag/garment/nanotrasen_representative
|
||||
name = "\improper Nanotrasen representative's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the Nanotrasen representative."
|
||||
|
||||
/obj/item/storage/bag/garment/nanotrasen_representative/populate_contents()
|
||||
new /obj/item/clothing/head/ntrep(src)
|
||||
new /obj/item/clothing/under/rank/procedure/representative(src)
|
||||
new /obj/item/clothing/under/rank/procedure/representative/skirt(src)
|
||||
new /obj/item/clothing/under/rank/procedure/representative/formal(src)
|
||||
new /obj/item/clothing/under/suit/female(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/shoes/sandal/fancy(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/white(src)
|
||||
new /obj/item/clothing/under/plasmaman/enviroslacks(src)
|
||||
|
||||
/obj/item/storage/bag/garment/magistrate
|
||||
name = "magistrate's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the magistrate."
|
||||
|
||||
/obj/item/storage/bag/garment/magistrate/populate_contents()
|
||||
new /obj/item/clothing/head/justice_wig(src)
|
||||
new /obj/item/clothing/head/powdered_wig(src)
|
||||
new /obj/item/clothing/under/rank/procedure/magistrate(src)
|
||||
new /obj/item/clothing/under/rank/procedure/magistrate/skirt(src)
|
||||
new /obj/item/clothing/under/rank/procedure/magistrate/formal(src)
|
||||
new /obj/item/clothing/suit/magirobe(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/white(src)
|
||||
new /obj/item/clothing/under/plasmaman/enviroslacks(src)
|
||||
|
||||
/obj/item/storage/bag/garment/blueshield
|
||||
name = "blueshield's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the blueshield."
|
||||
|
||||
/obj/item/storage/bag/garment/blueshield/populate_contents()
|
||||
new /obj/item/clothing/head/beret/centcom/officer(src)
|
||||
new /obj/item/clothing/head/beret/centcom/officer/navy(src)
|
||||
new /obj/item/clothing/under/rank/procedure/blueshield(src)
|
||||
new /obj/item/clothing/under/rank/procedure/blueshield/skirt(src)
|
||||
new /obj/item/clothing/under/rank/procedure/blueshield/formal(src)
|
||||
new /obj/item/clothing/suit/armor/vest/blueshield(src)
|
||||
new /obj/item/clothing/suit/storage/blueshield(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/neck/tie/blue(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/blueshield(src)
|
||||
new /obj/item/clothing/under/plasmaman/blueshield(src)
|
||||
|
||||
/obj/item/storage/bag/garment/quartermaster
|
||||
name = "quartermaster's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the quartermaster."
|
||||
|
||||
/obj/item/storage/bag/garment/quartermaster/populate_contents()
|
||||
new /obj/item/clothing/under/rank/cargo/qm(src)
|
||||
new /obj/item/clothing/under/rank/cargo/qm/skirt(src)
|
||||
new /obj/item/clothing/under/rank/cargo/qm/dress(src)
|
||||
new /obj/item/clothing/under/rank/cargo/qm/formal(src)
|
||||
new /obj/item/clothing/under/rank/cargo/qm/whimsy(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/head/qm(src)
|
||||
new /obj/item/clothing/head/beret/qm(src)
|
||||
new /obj/item/clothing/neck/cloak/quartermaster(src)
|
||||
new /obj/item/clothing/head/hardhat/orange(src)
|
||||
new /obj/item/clothing/suit/qmcoat(src)
|
||||
new /obj/item/clothing/neck/cloak/qm_mantle(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest/qm(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/tank/internals/emergency_oxygen/double(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/cargo(src)
|
||||
new /obj/item/clothing/under/plasmaman/cargo(src)
|
||||
|
||||
/obj/item/storage/bag/garment/warden
|
||||
name = "warden's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the warden."
|
||||
|
||||
/obj/item/storage/bag/garment/warden/populate_contents()
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden/alt(src)
|
||||
new /obj/item/clothing/head/beret/warden(src)
|
||||
new /obj/item/clothing/under/rank/security/warden(src)
|
||||
new /obj/item/clothing/under/rank/security/formal/warden(src)
|
||||
new /obj/item/clothing/under/rank/security/warden/corporate(src)
|
||||
new /obj/item/clothing/under/rank/security/warden/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/warden/skirt/corporate(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/swat/warden(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/security/warden(src)
|
||||
new /obj/item/clothing/under/plasmaman/security/warden(src)
|
||||
|
||||
/obj/item/storage/bag/garment/detective
|
||||
name = "detective's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the detective."
|
||||
|
||||
/obj/item/storage/bag/garment/detective/populate_contents()
|
||||
new /obj/item/clothing/under/rank/security/detective(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/color/black/forensics(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/clothing/neck/tie/black(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/yeah(src)
|
||||
|
||||
/obj/item/storage/bag/garment/chaplain
|
||||
name = "chaplain's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the chaplain."
|
||||
|
||||
/obj/item/storage/bag/garment/chaplain/populate_contents()
|
||||
new /obj/item/clothing/under/rank/civilian/chaplain(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/suit/hooded/abaya(src)
|
||||
new /obj/item/clothing/suit/hooded/nun(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/hooded/monk(src)
|
||||
new /obj/item/clothing/suit/witchhunter(src)
|
||||
new /obj/item/clothing/head/witchhunter_hat(src)
|
||||
new /obj/item/clothing/suit/holidaypriest(src)
|
||||
new /obj/item/clothing/head/helmet/riot/knight/templar(src)
|
||||
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/chaplain(src)
|
||||
new /obj/item/clothing/under/plasmaman/chaplain(src)
|
||||
|
||||
/obj/item/storage/bag/garment/psychologist
|
||||
name = "psychologist's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the psychologist."
|
||||
|
||||
/obj/item/storage/bag/garment/psychologist/populate_contents()
|
||||
new /obj/item/clothing/under/rank/medical/psych(src)
|
||||
new /obj/item/clothing/under/rank/medical/psych/turtleneck(src)
|
||||
new /obj/item/clothing/under/rank/medical/doctor(src)
|
||||
new /obj/item/clothing/under/rank/medical/doctor/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/psych(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/glasses/hud/skills(src)
|
||||
new /obj/item/clothing/neck/tie/blue(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman(src)
|
||||
new /obj/item/clothing/under/plasmaman(src)
|
||||
|
||||
/obj/item/storage/bag/garment/paramedic
|
||||
name = "paramedic's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the paramedic."
|
||||
|
||||
/obj/item/storage/bag/garment/paramedic/populate_contents()
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/clothing/under/rank/medical/paramedic/skirt(src)
|
||||
new /obj/item/clothing/head/soft/paramedic(src)
|
||||
new /obj/item/clothing/head/beret/paramedic(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/emt(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest/paramedic(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/medical(src)
|
||||
new /obj/item/clothing/under/plasmaman/medical(src)
|
||||
|
||||
/obj/item/storage/bag/garment/explorer
|
||||
name = "explorer's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the explorer."
|
||||
|
||||
/obj/item/storage/bag/garment/explorer/populate_contents()
|
||||
new /obj/item/clothing/under/rank/cargo/expedition(src)
|
||||
new /obj/item/clothing/under/rank/cargo/expedition/overalls(src)
|
||||
new /obj/item/clothing/head/soft/expedition(src)
|
||||
new /obj/item/clothing/head/beret/expedition(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/mask/gas/explorer(src)
|
||||
|
||||
/obj/item/storage/bag/garment/smith
|
||||
name = "smith's garment bag"
|
||||
desc = "A bag for storing extra clothes and shoes. This one belongs to the smith."
|
||||
|
||||
/obj/item/storage/bag/garment/smith/populate_contents()
|
||||
new /obj/item/clothing/under/rank/cargo/smith(src)
|
||||
new /obj/item/clothing/under/rank/cargo/smith/skirt(src)
|
||||
new /obj/item/clothing/under/rank/cargo/smith/overalls(src)
|
||||
new /obj/item/clothing/suit/apron/smith(src)
|
||||
new /obj/item/clothing/suit/jacket/bomber/smith(src)
|
||||
new /obj/item/clothing/head/soft/smith(src)
|
||||
new /obj/item/clothing/head/beret/smith(src)
|
||||
new /obj/item/clothing/gloves/smithing(src)
|
||||
new /obj/item/clothing/shoes/workboots/smithing(src)
|
||||
new /obj/item/clothing/under/plasmaman/smith(src)
|
||||
new /obj/item/clothing/head/helmet/space/plasmaman/smith(src)
|
||||
|
||||
/obj/item/storage/bag/garment/syndie
|
||||
name = "suspicious garment bag"
|
||||
icon_state = "garment_bag_syndie"
|
||||
desc = "A bag for storing extra clothes and shoes. Judging by the colors, this one belongs to someone with malicious intent."
|
||||
|
||||
/obj/item/storage/bag/garment/syndie/populate_contents()
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/under/syndicate/combat(src)
|
||||
new /obj/item/clothing/under/syndicate/greyman(src)
|
||||
new /obj/item/clothing/under/syndicate/sniper(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/mask/balaclava(src)
|
||||
new /obj/item/clothing/suit/storage/iaa/blackjacket(src)
|
||||
new /obj/item/clothing/suit/blacktrenchcoat(src)
|
||||
new /obj/item/clothing/head/beret/syndicate(src)
|
||||
new /obj/item/clothing/glasses/syndie(src)
|
||||
new /obj/item/clothing/neck/cloak/syndicate(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/clothing/shoes/combat(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
@@ -0,0 +1,88 @@
|
||||
//A storage item intended to be used by other items to provide storage functionality.
|
||||
//Types that use this should consider overriding emp_act() and hear_talk(), unless they shield their contents somehow.
|
||||
/obj/item/storage/internal
|
||||
var/obj/item/master_item
|
||||
|
||||
/obj/item/storage/internal/New(obj/item/MI)
|
||||
master_item = MI
|
||||
loc = master_item
|
||||
name = master_item.name
|
||||
..()
|
||||
|
||||
/obj/item/storage/internal/Destroy()
|
||||
master_item = null
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/internal/attack_hand()
|
||||
return //make sure this is never picked up
|
||||
|
||||
/obj/item/storage/internal/mob_can_equip(mob/M, slot, disable_warning = FALSE)
|
||||
return 0 //make sure this is never picked up
|
||||
|
||||
//Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items.
|
||||
//These procs are completely optional, it is up to the master item to decide when it's storage get's opened by calling open()
|
||||
//However they are helpful for allowing the master item to pretend it is a storage item itself.
|
||||
//If you are using these you will probably want to override attackby__legacy__attackchain() as well.
|
||||
//See /obj/item/clothing/suit/storage for an example.
|
||||
|
||||
//items that use internal storage have the option of calling this to emulate default storage MouseDrop behaviour.
|
||||
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
|
||||
//doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
|
||||
if(ishuman(user)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if(ismecha(user.loc)) // stops inventory actions in a mech
|
||||
return 0
|
||||
|
||||
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
|
||||
open(user)
|
||||
return FALSE
|
||||
|
||||
if(!is_screen_atom(over_object))
|
||||
return TRUE
|
||||
|
||||
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this...
|
||||
if(!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
|
||||
return 0
|
||||
|
||||
if(!user.restrained() && !user.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
user.unequip(master_item)
|
||||
user.put_in_r_hand(master_item)
|
||||
if("l_hand")
|
||||
user.unequip(master_item)
|
||||
user.put_in_l_hand(master_item)
|
||||
master_item.add_fingerprint(user)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
//items that use internal storage have the option of calling this to emulate default storage attack_hand behaviour.
|
||||
//returns 1 if the master item's parent's attack_hand() should be called, 0 otherwise.
|
||||
//It's strange, but no other way of doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/storage/internal/proc/handle_attack_hand(mob/user as mob)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_store == master_item && !H.get_active_hand()) //Prevents opening if it's in a pocket.
|
||||
H.put_in_hands(master_item)
|
||||
H.l_store = null
|
||||
return 0
|
||||
if(H.r_store == master_item && !H.get_active_hand())
|
||||
H.put_in_hands(master_item)
|
||||
H.r_store = null
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
if(master_item.loc == user)
|
||||
open(user)
|
||||
return 0
|
||||
|
||||
for(var/mob/M in range(1, master_item.loc))
|
||||
if(M.s_active == src)
|
||||
close(M)
|
||||
return 1
|
||||
|
||||
/obj/item/storage/internal/Adjacent(atom/neighbor)
|
||||
return master_item.Adjacent(neighbor)
|
||||
@@ -0,0 +1,796 @@
|
||||
// To clarify:
|
||||
// For use_to_pickup and allow_quick_gather functionality,
|
||||
// see item/attackby() (/game/objects/items.dm, params)
|
||||
// Do not remove this functionality without good reason, cough reagent_containers cough.
|
||||
// -Sayu
|
||||
|
||||
|
||||
/obj/item/storage
|
||||
name = "storage"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
flags_2 = BLOCKS_LIGHT_2
|
||||
/// No message on putting items in.
|
||||
var/silent = FALSE
|
||||
/// List of objects which this item can store (if set, it can't store anything else)
|
||||
var/list/can_hold = list()
|
||||
/// List of objects that can be stored, regardless of w_class
|
||||
var/list/w_class_override = list()
|
||||
/// List of objects which this item can't store (in effect only if can_hold isn't set)
|
||||
var/list/cant_hold = list()
|
||||
/// List of objects which this item overrides the cant_hold list (used to negate cant_hold on specific items. Ex: Allowing Smuggler's Satchels (subtype of backpack) to be stored inside bags of holding.)
|
||||
var/list/cant_hold_override = list()
|
||||
/// Max size of objects that this object can store (in effect only if can_hold isn't set)
|
||||
var/max_w_class = WEIGHT_CLASS_SMALL
|
||||
/// The sum of the w_classes of all the items in this storage item.
|
||||
var/max_combined_w_class = 14
|
||||
/// The number of storage slots in this container.
|
||||
var/storage_slots = 7
|
||||
var/atom/movable/screen/storage/boxes = null
|
||||
var/atom/movable/screen/close/closer = null
|
||||
|
||||
/// Set this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.
|
||||
var/use_to_pickup = FALSE
|
||||
/// Set this to make the storage item group contents of the same type and display them as a number.
|
||||
var/display_contents_with_number
|
||||
/// Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
|
||||
var/allow_quick_empty
|
||||
/// Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
|
||||
var/allow_quick_gather
|
||||
/// Pick up one item at a time or everything on the tile
|
||||
var/pickup_all_on_tile = TRUE
|
||||
/// Sound played when used. `null` for no sound.
|
||||
var/use_sound = "rustle"
|
||||
/// What kind of [/obj/item/stack] can this be folded into. (e.g. Boxes and cardboard)
|
||||
var/foldable = null
|
||||
/// How much of the stack item do you get.
|
||||
var/foldable_amt = 0
|
||||
|
||||
/// Lazy list of mobs which are currently viewing the storage inventory.
|
||||
var/list/mobs_viewing
|
||||
|
||||
// Allow storage items of the same size to be put inside
|
||||
var/allow_same_size = FALSE
|
||||
|
||||
/obj/item/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
can_hold = typecacheof(can_hold)
|
||||
cant_hold = typecacheof(cant_hold) - typecacheof(cant_hold_override)
|
||||
|
||||
populate_contents()
|
||||
|
||||
boxes = new /atom/movable/screen/storage()
|
||||
boxes.name = "storage"
|
||||
boxes.master = src
|
||||
boxes.icon_state = "block"
|
||||
boxes.screen_loc = "7,7 to 10,8"
|
||||
boxes.layer = HUD_LAYER
|
||||
boxes.plane = HUD_PLANE
|
||||
closer = new /atom/movable/screen/close()
|
||||
closer.master = src
|
||||
closer.icon_state = "backpack_close"
|
||||
closer.layer = ABOVE_HUD_LAYER
|
||||
closer.plane = ABOVE_HUD_PLANE
|
||||
orient2hud()
|
||||
|
||||
ADD_TRAIT(src, TRAIT_ADJACENCY_TRANSPARENT, ROUNDSTART_TRAIT)
|
||||
RegisterSignal(src, COMSIG_ATOM_EXITED, PROC_REF(on_atom_exited))
|
||||
|
||||
/obj/item/storage/Destroy()
|
||||
for(var/obj/O in contents)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
|
||||
QDEL_NULL(boxes)
|
||||
QDEL_NULL(closer)
|
||||
LAZYCLEARLIST(mobs_viewing)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/examine(mob/user)
|
||||
. = ..()
|
||||
if(allow_quick_empty)
|
||||
. += "<span class='notice'>You can use [src] in hand to empty it's entire contents.</span>"
|
||||
if(allow_quick_gather)
|
||||
. += "<span class='notice'>You can <b>Alt-Shift-Click</b> [src] to switch it's gathering method.</span>"
|
||||
|
||||
/obj/item/storage/forceMove(atom/destination)
|
||||
. = ..()
|
||||
if(!ismob(destination.loc))
|
||||
for(var/mob/player in mobs_viewing)
|
||||
if(player == destination)
|
||||
continue
|
||||
hide_from(player)
|
||||
|
||||
/obj/item/storage/proc/removal_allowed_check(mob/user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/proc/dump_storage(mob/user, obj/item/storage/target)
|
||||
if(!length(contents) || user.restrained() || (HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) || !user.can_reach(target) || src == target)
|
||||
return
|
||||
for(var/obj/item/thing in contents)
|
||||
if(!target.can_be_inserted(thing))
|
||||
continue
|
||||
if(!do_after(user, 0.3 SECONDS, target = user))
|
||||
break
|
||||
playsound(loc, "rustle", 50, TRUE, -5)
|
||||
target.handle_item_insertion(thing, user)
|
||||
|
||||
/obj/item/storage/MouseDrop(obj/over_object, src_location, over_location, src_control, over_control, params)
|
||||
if(!ismob(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
return
|
||||
var/mob/M = usr
|
||||
|
||||
if(ismecha(M.loc) || M.incapacitated(FALSE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
|
||||
return
|
||||
|
||||
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
|
||||
if(M.s_active)
|
||||
M.s_active.close(M)
|
||||
open(M)
|
||||
return
|
||||
|
||||
if(isstorage(over_object))
|
||||
var/obj/item/storage = over_object
|
||||
if(!storage.in_storage)
|
||||
dump_storage(M, over_object)
|
||||
return
|
||||
else if(ismodcontrol(over_object))
|
||||
var/obj/item/mod/control/mod = over_object
|
||||
dump_storage(M, mod.bag)
|
||||
return
|
||||
|
||||
if((istype(over_object, /obj/structure/table) || isfloorturf(over_object)) && length(contents) \
|
||||
&& loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
|
||||
var/turf/T = get_turf(over_object)
|
||||
if(!removal_allowed_check(M))
|
||||
return
|
||||
|
||||
if(isfloorturf(over_object))
|
||||
if(get_turf(M) != T)
|
||||
return // Can only empty containers onto the floor under you
|
||||
if(tgui_alert(M, "Empty [src] onto [T]?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
if(!(M && over_object && length(contents) && loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && get_turf(M) == T))
|
||||
return // Something happened while the player was thinking
|
||||
hide_from(M)
|
||||
M.face_atom(over_object)
|
||||
M.visible_message("<span class='notice'>[M] empties [src] onto [over_object].</span>",
|
||||
"<span class='notice'>You empty [src] onto [over_object].</span>")
|
||||
var/list/params_list = params2list(params)
|
||||
var/x_offset = text2num(params_list["icon-x"]) - 16
|
||||
var/y_offset = text2num(params_list["icon-y"]) - 16
|
||||
for(var/obj/item/I in contents)
|
||||
remove_from_storage(I, T)
|
||||
I.scatter_atom(x_offset, y_offset)
|
||||
update_icon() // For content-sensitive icons
|
||||
return
|
||||
|
||||
if(!is_screen_atom(over_object))
|
||||
return ..()
|
||||
if(!(loc == M) || (loc && loc.loc == M))
|
||||
return
|
||||
if(!M.restrained() && !M.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(!M.unequip(src))
|
||||
return
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
if(!M.unequip(src))
|
||||
return
|
||||
M.put_in_l_hand(src)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
open(usr)
|
||||
|
||||
/obj/item/storage/AltClick(mob/user)
|
||||
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE))
|
||||
open(user)
|
||||
add_fingerprint(user)
|
||||
else if(isobserver(user))
|
||||
show_to(user)
|
||||
|
||||
/**
|
||||
* Loops through any nested containers inside `src`, and returns a list of everything inside them.
|
||||
*
|
||||
* Currently checks for storage containers, gifts containing storage containers, and folders.
|
||||
*/
|
||||
/obj/item/storage/proc/return_inv()
|
||||
var/list/L = list()
|
||||
L += contents // Inventory of the main storage item
|
||||
|
||||
for(var/obj/item/storage/S in src) // Inventory of nested storage items
|
||||
L += S.return_inv()
|
||||
for(var/obj/item/gift/G in src)
|
||||
L += G.gift
|
||||
if(isstorage(G.gift)) // If the gift contains a storage item
|
||||
var/obj/item/storage/S = G.gift
|
||||
L += S.return_inv()
|
||||
for(var/obj/item/folder/F in src)
|
||||
L += F.contents
|
||||
return L
|
||||
|
||||
/**
|
||||
* Shows `user` the contents of `src`, and activates any mouse trap style triggers.
|
||||
*/
|
||||
/obj/item/storage/proc/show_to(mob/user)
|
||||
if(!user.client)
|
||||
return
|
||||
if(user.s_active != src && !isobserver(user))
|
||||
for(var/obj/item/I in src)
|
||||
if(I.on_found(user)) // For mouse traps and such
|
||||
return // If something triggered, don't open the UI
|
||||
orient2hud(user) // this only needs to happen to make .contents show properly as screen objects.
|
||||
if(user.s_active)
|
||||
user.s_active.hide_from(user) // If there's already an interface open, close it.
|
||||
user.client.screen |= boxes
|
||||
user.client.screen |= closer
|
||||
user.client.screen |= contents
|
||||
user.s_active = src
|
||||
LAZYDISTINCTADD(mobs_viewing, user)
|
||||
|
||||
/**
|
||||
* Hides the current container interface from `user`.
|
||||
*/
|
||||
/obj/item/storage/proc/hide_from(mob/user)
|
||||
LAZYREMOVE(mobs_viewing, user) // Remove clientless mobs too
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen -= boxes
|
||||
user.client.screen -= closer
|
||||
user.client.screen -= contents
|
||||
if(user.s_active == src)
|
||||
user.s_active = null
|
||||
|
||||
/**
|
||||
* Hides the current container interface from all viewers.
|
||||
*/
|
||||
/obj/item/storage/proc/hide_from_all()
|
||||
for(var/mob/M in mobs_viewing)
|
||||
hide_from(M)
|
||||
|
||||
/**
|
||||
* Checks all mobs currently viewing the storage inventory, and hides it if they shouldn't be able to see it.
|
||||
*/
|
||||
/obj/item/storage/proc/update_viewers()
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if(!QDELETED(M) && M.s_active == src && Adjacent(M))
|
||||
continue
|
||||
hide_from(M)
|
||||
for(var/obj/item/storage/child in src)
|
||||
child.update_viewers()
|
||||
|
||||
/obj/item/storage/Moved(atom/oldloc, dir, forced = FALSE)
|
||||
. = ..()
|
||||
update_viewers()
|
||||
|
||||
/obj/item/storage/proc/open(mob/user)
|
||||
if(isobserver(user))
|
||||
show_to(user)
|
||||
return
|
||||
if(use_sound && isliving(user))
|
||||
playsound(loc, use_sound, 50, TRUE, -5)
|
||||
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
|
||||
/obj/item/storage/proc/close(mob/user)
|
||||
hide_from(user)
|
||||
user.s_active = null
|
||||
|
||||
/**
|
||||
* Draws the inventory and places the items on it using custom positions.
|
||||
*
|
||||
* `tx` and `ty` are the upper left tile.
|
||||
* `mx` and `my` are the bottom right tile.
|
||||
*
|
||||
* The numbers are calculated from the bottom left, with the bottom left being `1,1`.
|
||||
*/
|
||||
/obj/item/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
boxes.screen_loc = "[tx],[ty] to [mx],[my]"
|
||||
for(var/obj/O in contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
closer.screen_loc = "[mx + 1],[my]"
|
||||
|
||||
//This proc draws out the inventory and places the items on it. It uses the standard position.
|
||||
/obj/item/storage/proc/standard_orient_objs(rows, cols, list/datum/numbered_display/display_contents)
|
||||
var/cx = 4
|
||||
var/cy = 2 + rows
|
||||
boxes.screen_loc = "4:16,2:16 to [4 + cols]:16,[2 + rows]:16"
|
||||
|
||||
if(display_contents_with_number)
|
||||
for(var/datum/numbered_display/ND in display_contents)
|
||||
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
|
||||
ND.sample_object.maptext = "<font color='white' face='Small Fonts'>[(ND.number > 1) ? "[ND.number]" : ""]</font>"
|
||||
ND.sample_object.layer = ABOVE_HUD_LAYER
|
||||
ND.sample_object.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4 + cols))
|
||||
cx = 4
|
||||
cy--
|
||||
else
|
||||
for(var/obj/O in contents)
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
|
||||
O.screen_loc = "[cx]:16,[cy]:16"
|
||||
O.maptext = ""
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4 + cols))
|
||||
cx = 4
|
||||
cy--
|
||||
closer.screen_loc = "[4 + cols + 1]:16,2:16"
|
||||
|
||||
/datum/numbered_display
|
||||
var/obj/item/sample_object
|
||||
var/number
|
||||
|
||||
/datum/numbered_display/New(obj/item/sample)
|
||||
if(!istype(sample))
|
||||
qdel(src)
|
||||
return
|
||||
sample_object = sample
|
||||
number = 1
|
||||
|
||||
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
|
||||
/obj/item/storage/proc/orient2hud(mob/user)
|
||||
var/adjusted_contents = length(contents)
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
if(display_contents_with_number)
|
||||
for(var/obj/O in contents)
|
||||
O.layer = initial(O.layer)
|
||||
O.plane = initial(O.plane)
|
||||
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/I in contents)
|
||||
var/found = FALSE
|
||||
for(var/datum/numbered_display/ND in numbered_contents)
|
||||
if(ND.sample_object.should_stack_with(I))
|
||||
ND.number++
|
||||
found = TRUE
|
||||
break
|
||||
if(!found)
|
||||
adjusted_contents++
|
||||
numbered_contents += new/datum/numbered_display(I)
|
||||
|
||||
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.
|
||||
standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
|
||||
/**
|
||||
* Checks whether `I` can be inserted into the container.
|
||||
*
|
||||
* Returns `TRUE` if it can, and `FALSE` if it can't.
|
||||
* Arguments:
|
||||
* * obj/item/I - The item to insert
|
||||
* * stop_messages - Don't display a warning message if the item can't be inserted
|
||||
*/
|
||||
/obj/item/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE)
|
||||
if(!istype(I) || (I.flags & ABSTRACT)) // Not an item
|
||||
return
|
||||
|
||||
if(loc == I)
|
||||
return FALSE //Means the item is already in the storage item
|
||||
|
||||
if(!I.can_enter_storage(src, usr))
|
||||
return FALSE
|
||||
|
||||
if(length(contents) >= storage_slots)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[I] won't fit in [src], make some space!</span>")
|
||||
return FALSE //Storage item is full
|
||||
|
||||
if(length(can_hold))
|
||||
if(!is_type_in_typecache(I, can_hold))
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[src] cannot hold [I].</span>")
|
||||
return FALSE
|
||||
|
||||
if(is_type_in_typecache(I, cant_hold)) //Check for specific items which this container can't hold.
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[src] cannot hold [I].</span>")
|
||||
return FALSE
|
||||
|
||||
if(length(cant_hold) && isstorage(I)) //Checks nested storage contents for restricted objects, we don't want people sneaking the NAD in via boxes now, do we?
|
||||
var/obj/item/storage/S = I
|
||||
for(var/obj/A in S.return_inv())
|
||||
if(is_type_in_typecache(A, cant_hold))
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[src] rejects [I] because of its contents.</span>")
|
||||
return FALSE
|
||||
|
||||
if(I.w_class > max_w_class)
|
||||
if(length(w_class_override))
|
||||
if(is_type_in_list(I, w_class_override))
|
||||
return TRUE
|
||||
else
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[I] is too big for [src].</span>")
|
||||
return FALSE
|
||||
else
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[I] is too big for [src].</span>")
|
||||
return FALSE
|
||||
|
||||
var/sum_w_class = I.w_class
|
||||
for(var/obj/item/item in contents)
|
||||
sum_w_class += item.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
|
||||
|
||||
if(sum_w_class > max_combined_w_class)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[src] is full, make some space.</span>")
|
||||
return FALSE
|
||||
|
||||
if(I.w_class >= w_class && isstorage(I))
|
||||
if(!allow_same_size) //BoHs should be able to hold backpacks again. The override for putting a BoH in a BoH is in backpack.dm.
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='warning'>[src] cannot hold [I] as it's a storage item of the same size.</span>")
|
||||
return FALSE //To prevent the stacking of same sized storage items.
|
||||
|
||||
if(I.flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry.
|
||||
to_chat(usr, "<span class='warning'>[I] is stuck to your hand, you can't put it in [src]</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Handles items being inserted into a storage container.
|
||||
*
|
||||
* This doesn't perform any checks of whether an item can be inserted. That's done by [/obj/item/storage/proc/can_be_inserted]
|
||||
* Arguments:
|
||||
* * obj/item/I - The item to be inserted
|
||||
* * mob/user - The mob performing the insertion
|
||||
* * prevent_warning - Stop the insertion message being displayed. Intended for cases when you are inserting multiple items at once.
|
||||
*/
|
||||
/obj/item/storage/proc/handle_item_insertion(obj/item/I, mob/user, prevent_warning = FALSE)
|
||||
if(!istype(I))
|
||||
return FALSE
|
||||
if(user)
|
||||
if(!Adjacent(user) && !isnewplayer(user))
|
||||
return FALSE
|
||||
if(!user.unequip(I))
|
||||
return FALSE
|
||||
user.update_icons() //update our overlays
|
||||
if(QDELING(I))
|
||||
return FALSE
|
||||
if(silent || HAS_TRAIT(I, TRAIT_SILENT_INSERTION))
|
||||
prevent_warning = TRUE
|
||||
I.forceMove(src)
|
||||
if(QDELING(I))
|
||||
return FALSE
|
||||
I.on_enter_storage(src)
|
||||
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if((M.s_active == src) && M.client)
|
||||
M.client.screen += I
|
||||
if(user)
|
||||
if(user.client && user.s_active != src)
|
||||
user.client.screen -= I
|
||||
if(length(user.observers))
|
||||
for(var/mob/observer in user.observers)
|
||||
if(observer.client && observer.s_active != src)
|
||||
observer.client.screen -= I
|
||||
I.dropped(user, TRUE)
|
||||
if(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!prevent_warning)
|
||||
// the item's user will always get a notification
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
|
||||
// if the item less than normal sized, only people within 1 tile get the message, otherwise, everybody in view gets it
|
||||
if(I.w_class < WEIGHT_CLASS_NORMAL)
|
||||
for(var/mob/M in orange(1, user))
|
||||
if(in_range(M, user))
|
||||
M.show_message("<span class='notice'>[user] puts [I] into [src].</span>")
|
||||
else
|
||||
// restrict player list to include only those in view
|
||||
for(var/mob/M in oviewers(7, user))
|
||||
M.show_message("<span class='notice'>[user] puts [I] into [src].</span>")
|
||||
orient2hud(user)
|
||||
if(user)
|
||||
if(user.s_active)
|
||||
user.s_active.show_to(user)
|
||||
|
||||
I.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt
|
||||
I.in_inventory = TRUE
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/proc/on_atom_exited(datum/source, atom/exited, direction)
|
||||
return remove_from_storage(exited, exited.loc)
|
||||
|
||||
/**
|
||||
* Handles the removal of an item from a storage container.
|
||||
*
|
||||
* Arguments:
|
||||
* * obj/item/I - The item to be removed
|
||||
* * atom/new_location - The location to send the item to.
|
||||
*/
|
||||
/obj/item/storage/proc/remove_from_storage(obj/item/I, atom/new_location)
|
||||
if(!istype(I))
|
||||
return FALSE
|
||||
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
if((M.s_active == src) && M.client)
|
||||
M.client.screen -= I
|
||||
|
||||
if(new_location)
|
||||
if(ismob(loc))
|
||||
I.dropped(usr, TRUE)
|
||||
if(ismob(new_location))
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
else
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.forceMove(new_location)
|
||||
else
|
||||
I.forceMove(get_turf(src))
|
||||
|
||||
if(usr)
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
if(I.maptext)
|
||||
I.maptext = ""
|
||||
I.on_exit_storage(src)
|
||||
I.mouse_opacity = initial(I.mouse_opacity)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/deconstruct(disassembled = TRUE)
|
||||
var/drop_loc = loc
|
||||
if(ismob(loc))
|
||||
drop_loc = get_turf(src)
|
||||
for(var/obj/item/I in contents)
|
||||
remove_from_storage(I, drop_loc)
|
||||
qdel(src)
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
/obj/item/storage/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/hand_labeler))
|
||||
var/obj/item/hand_labeler/labeler = I
|
||||
if(labeler.mode)
|
||||
return FALSE
|
||||
if(user.a_intent != INTENT_HELP && issimulatedturf(loc)) // Stops you from putting your baton in the storage on accident
|
||||
return FALSE
|
||||
. = TRUE //no afterattack
|
||||
if(isrobot(user))
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(!can_be_inserted(I))
|
||||
if(length(contents) >= storage_slots) //don't use items on the backpack if they don't fit
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
handle_item_insertion(I, user)
|
||||
|
||||
/obj/item/storage/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.get_active_hand())
|
||||
if(H.l_store == src) //Prevents opening if it's in a pocket.
|
||||
H.put_in_hands(src)
|
||||
H.l_store = null
|
||||
return
|
||||
if(H.r_store == src)
|
||||
H.put_in_hands(src)
|
||||
H.r_store = null
|
||||
return
|
||||
|
||||
orient2hud(user)
|
||||
if(loc == user)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
open(user)
|
||||
else
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/storage/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
update_viewers()
|
||||
|
||||
/obj/item/storage/attack_ghost(mob/user)
|
||||
if(isobserver(user))
|
||||
// Revenants don't get to play with the toys.
|
||||
show_to(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/AltShiftClick(mob/living/carbon/human/user)
|
||||
|
||||
pickup_all_on_tile = !pickup_all_on_tile
|
||||
switch(pickup_all_on_tile)
|
||||
if(TRUE)
|
||||
to_chat(usr, "[src] now picks up all items in a tile at once.")
|
||||
if(FALSE)
|
||||
to_chat(usr, "[src] now picks up one item at a time.")
|
||||
|
||||
/obj/item/storage/proc/drop_inventory(user)
|
||||
var/turf/T = get_turf(src)
|
||||
hide_from(user)
|
||||
for(var/obj/item/I in contents)
|
||||
remove_from_storage(I, T)
|
||||
I.scatter_atom()
|
||||
CHECK_TICK
|
||||
|
||||
/**
|
||||
* Populates the container with items
|
||||
*
|
||||
* Override with whatever you want to put in the container
|
||||
*/
|
||||
/obj/item/storage/proc/populate_contents()
|
||||
return // Override
|
||||
|
||||
/obj/item/storage/emp_act(severity)
|
||||
..()
|
||||
for(var/I in contents)
|
||||
var/atom/A = I
|
||||
A.emp_act(severity)
|
||||
|
||||
/obj/item/storage/hear_talk(mob/living/M, list/message_pieces)
|
||||
..()
|
||||
for(var/obj/O in contents)
|
||||
O.hear_talk(M, message_pieces)
|
||||
|
||||
/obj/item/storage/hear_message(mob/living/M, msg)
|
||||
..()
|
||||
for(var/obj/O in contents)
|
||||
O.hear_message(M, msg)
|
||||
|
||||
/obj/item/storage/attack_self__legacy__attackchain(mob/user)
|
||||
//Clicking on itself will empty it, if allow_quick_empty is TRUE
|
||||
if(allow_quick_empty && user.is_in_active_hand(src))
|
||||
drop_inventory(user)
|
||||
|
||||
else if(foldable)
|
||||
fold(user)
|
||||
|
||||
/obj/item/storage/proc/fold(mob/user)
|
||||
if(length(contents))
|
||||
to_chat(user, "<span class='warning'>You can't fold this [name] with items still inside!</span>")
|
||||
return
|
||||
if(!ispath(foldable))
|
||||
return
|
||||
|
||||
var/found = FALSE
|
||||
for(var/mob/M in range(1))
|
||||
if(M.s_active == src) // Close any open UI windows first
|
||||
close(M)
|
||||
if(M == user)
|
||||
found = TRUE
|
||||
if(!found) // User is too far away
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
|
||||
var/obj/item/stack/I = new foldable(get_turf(src), foldable_amt)
|
||||
user.put_in_hands(I)
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Returns the storage depth of an atom up to the area level.
|
||||
*
|
||||
* The storage depth is the number of storage items the atom is contained in.
|
||||
* Returns `-1` if the atom was not found in a container.
|
||||
*/
|
||||
/atom/proc/storage_depth(atom/container)
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while(cur_atom && !(cur_atom in container.contents))
|
||||
if(isarea(cur_atom))
|
||||
return -1
|
||||
if(isstorage(cur_atom.loc))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if(!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
/**
|
||||
* Like [/atom/proc/storage_depth], but returns the depth to the nearest turf.
|
||||
*
|
||||
* Returns `-1` if there's no top level turf. (A loc was null somewhere, or a non-turf atom's loc was an area somehow.)
|
||||
*/
|
||||
/atom/proc/storage_depth_turf()
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while(cur_atom && !isturf(cur_atom))
|
||||
if(isarea(cur_atom))
|
||||
return -1
|
||||
if(isstorage(cur_atom.loc))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if(!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
/obj/item/storage/serialize()
|
||||
var/data = ..()
|
||||
var/list/content_list = list()
|
||||
data["content"] = content_list
|
||||
data["slots"] = storage_slots
|
||||
data["max_w_class"] = max_w_class
|
||||
data["max_c_w_class"] = max_combined_w_class
|
||||
for(var/thing in contents)
|
||||
var/atom/movable/AM = thing
|
||||
// This code does not watch out for infinite loops
|
||||
// But then again a tesseract would destroy the server anyways
|
||||
// Also I wish I could just insert a list instead of it reading it the wrong way
|
||||
content_list.len++
|
||||
content_list[length(content_list)] = AM.serialize()
|
||||
return data
|
||||
|
||||
/obj/item/storage/deserialize(list/data)
|
||||
if(isnum(data["slots"]))
|
||||
storage_slots = data["slots"]
|
||||
if(isnum(data["max_w_class"]))
|
||||
max_w_class = data["max_w_class"]
|
||||
if(isnum(data["max_c_w_class"]))
|
||||
max_combined_w_class = data["max_c_w_class"]
|
||||
for(var/thing in contents)
|
||||
qdel(thing) // out with the old
|
||||
for(var/thing in data["content"])
|
||||
if(islist(thing))
|
||||
list_to_object(thing, src)
|
||||
else if(thing == null)
|
||||
stack_trace("Null entry found in storage/deserialize.")
|
||||
else
|
||||
stack_trace("Non-list thing found in storage/deserialize (Thing: [thing])")
|
||||
..()
|
||||
|
||||
/obj/item/storage/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/ex_act(severity)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity)
|
||||
CHECK_TICK
|
||||
..()
|
||||
|
||||
/obj/item/storage/proc/can_items_stack(obj/item/item_1, obj/item/item_2)
|
||||
if(!item_1 || !item_2)
|
||||
return
|
||||
|
||||
return item_1.type == item_2.type && item_1.name == item_2.name
|
||||
|
||||
/obj/item/storage/proc/swap_items(obj/item/item_1, obj/item/item_2, mob/user = null)
|
||||
if(!(item_1.loc == src && item_2.loc == src))
|
||||
return
|
||||
|
||||
var/index_1 = contents.Find(item_1)
|
||||
var/index_2 = contents.Find(item_2)
|
||||
|
||||
var/list/new_contents = contents.Copy()
|
||||
new_contents.Swap(index_1, index_2)
|
||||
contents = new_contents
|
||||
|
||||
if(user && user.s_active == src)
|
||||
orient2hud(user)
|
||||
show_to(user)
|
||||
@@ -0,0 +1,45 @@
|
||||
// Sprites from CM13
|
||||
/obj/item/storage/surgical_tray
|
||||
name = "surgical tray"
|
||||
desc = "A small metallic tray covered in sterile tarp. Intended to store surgical tools in a neat and clean fashion."
|
||||
icon_state = "surgical_tray"
|
||||
storage_slots = 22 // 11 Items, x2 to be sure
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_GIGANTIC
|
||||
max_combined_w_class = 38 // Items listed add up to 19, x2 to be sure
|
||||
can_hold = list(
|
||||
/obj/item/scalpel,
|
||||
/obj/item/cautery,
|
||||
/obj/item/hemostat,
|
||||
/obj/item/retractor,
|
||||
/obj/item/fix_o_vein,
|
||||
/obj/item/surgicaldrill,
|
||||
/obj/item/circular_saw,
|
||||
/obj/item/bonegel,
|
||||
/obj/item/bonesetter,
|
||||
/obj/item/stack/medical/bruise_pack,
|
||||
/obj/item/stack/medical/ointment,
|
||||
/obj/item/surgical_drapes,
|
||||
/obj/item/dissector,
|
||||
)
|
||||
|
||||
/obj/item/storage/surgical_tray/Initialize(mapload)
|
||||
. = ..()
|
||||
new /obj/item/scalpel(src)
|
||||
new /obj/item/cautery(src)
|
||||
new /obj/item/hemostat(src)
|
||||
new /obj/item/retractor(src)
|
||||
new /obj/item/fix_o_vein(src)
|
||||
new /obj/item/surgicaldrill(src)
|
||||
new /obj/item/circular_saw(src)
|
||||
new /obj/item/bonegel(src)
|
||||
new /obj/item/bonesetter(src)
|
||||
new /obj/item/stack/medical/bruise_pack/advanced(src)
|
||||
new /obj/item/stack/medical/ointment/advanced(src)
|
||||
new /obj/item/surgical_drapes(src)
|
||||
|
||||
/obj/item/storage/surgical_tray/update_icon_state()
|
||||
if(!length(contents))
|
||||
icon_state = "surgical_tray_e"
|
||||
else
|
||||
icon_state = "surgical_tray"
|
||||
@@ -0,0 +1,126 @@
|
||||
/obj/item/storage/wallet
|
||||
name = "leather wallet"
|
||||
desc = "Made from genuine leather, it is of the highest quality."
|
||||
storage_slots = 10
|
||||
icon = 'icons/obj/wallets.dmi'
|
||||
icon_state = "wallet"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
can_hold = list(
|
||||
/obj/item/stack/spacecash,
|
||||
/obj/item/card,
|
||||
/obj/item/clothing/mask/cigarette,
|
||||
/obj/item/flashlight/pen,
|
||||
/obj/item/seeds,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/coin,
|
||||
/obj/item/food/candy/chocolate_coin,
|
||||
/obj/item/food/candy/coin,
|
||||
/obj/item/food/candy/cash,
|
||||
/obj/item/food/customizable/candy/coin,
|
||||
/obj/item/food/customizable/candy/cash,
|
||||
/obj/item/dice,
|
||||
/obj/item/disk,
|
||||
/obj/item/bio_chip_implanter,
|
||||
/obj/item/lighter,
|
||||
/obj/item/match,
|
||||
/obj/item/paper,
|
||||
/obj/item/pen,
|
||||
/obj/item/photo,
|
||||
/obj/item/reagent_containers/dropper,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/stamp)
|
||||
cant_hold = list(
|
||||
/obj/item/screwdriver/power
|
||||
)
|
||||
slot_flags = ITEM_SLOT_ID
|
||||
|
||||
var/obj/item/card/id/front_id = null
|
||||
|
||||
// allows for clicking of stuff on our person/on the ground to put in the wallet, so easy to stick your ID in your wallet
|
||||
use_to_pickup = TRUE
|
||||
pickup_all_on_tile = FALSE
|
||||
|
||||
|
||||
/obj/item/storage/wallet/remove_from_storage(obj/item/I, atom/new_location)
|
||||
. = ..()
|
||||
if(. && istype(I, /obj/item/card/id))
|
||||
refresh_ID()
|
||||
|
||||
/obj/item/storage/wallet/handle_item_insertion(obj/item/I, mob/user, prevent_warning = FALSE)
|
||||
. = ..()
|
||||
if(. && istype(I, /obj/item/card/id))
|
||||
refresh_ID()
|
||||
|
||||
/obj/item/storage/wallet/orient2hud(mob/user)
|
||||
. = ..()
|
||||
refresh_ID()
|
||||
|
||||
/obj/item/storage/wallet/proc/refresh_ID()
|
||||
// Locate the first ID in the wallet
|
||||
front_id = (locate(/obj/item/card/id) in contents)
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/wearing_human = loc
|
||||
if(wearing_human.wear_id == src)
|
||||
wearing_human.sec_hud_set_ID()
|
||||
|
||||
update_appearance(UPDATE_NAME|UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/wallet/update_overlays()
|
||||
. = ..()
|
||||
if(!front_id)
|
||||
return
|
||||
. += mutable_appearance(front_id.icon, front_id.icon_state)
|
||||
. += front_id.overlays
|
||||
. += mutable_appearance(icon, "wallet_overlay")
|
||||
|
||||
// fuck yeah, ass photo in my wallet
|
||||
var/obj/item/photo/photo = locate(/obj/item/photo) in contents
|
||||
if(!photo)
|
||||
return
|
||||
var/mutable_appearance/MA = mutable_appearance(photo.appearance)
|
||||
MA.pixel_x = 11
|
||||
MA.pixel_y = 1
|
||||
. += MA
|
||||
. += mutable_appearance(icon, "photo_overlay")
|
||||
|
||||
/obj/item/storage/wallet/update_name(updates)
|
||||
. = ..()
|
||||
if(front_id)
|
||||
name = "wallet displaying [front_id]"
|
||||
else
|
||||
name = initial(name)
|
||||
|
||||
/obj/item/storage/wallet/GetID()
|
||||
return front_id
|
||||
|
||||
/obj/item/storage/wallet/GetAccess()
|
||||
var/obj/item/I = GetID()
|
||||
if(I)
|
||||
return I.GetAccess()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/wallet/random/populate_contents()
|
||||
var/cash = pick(/obj/item/stack/spacecash,
|
||||
/obj/item/stack/spacecash/c5,
|
||||
/obj/item/stack/spacecash/c10,
|
||||
/obj/item/stack/spacecash/c50,
|
||||
/obj/item/stack/spacecash/c100)
|
||||
var/coin = pickweight(list(/obj/item/coin/iron = 3,
|
||||
/obj/item/coin/silver = 2,
|
||||
/obj/item/coin/gold = 1))
|
||||
|
||||
new cash(src)
|
||||
if(prob(50)) // 50% chance of a second
|
||||
new cash(src)
|
||||
new coin(src)
|
||||
|
||||
|
||||
// Arcade Wallet
|
||||
/obj/item/storage/wallet/cheap
|
||||
name = "cheap wallet"
|
||||
desc = "A cheap and flimsy wallet from the arcade."
|
||||
storage_slots = 5 //smaller storage than normal wallets
|
||||
Reference in New Issue
Block a user