Skip to content

Commit

Permalink
[MIRROR] New crates [MDB IGNORE] (#646)
Browse files Browse the repository at this point in the history
* New crates (#79665)

image: Crates got new sprites
image: Added more crate styles

* New crates

* Crate-b-gone

* The Nuclear Option

* The Nuke Clear Option

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Andrew <[email protected]>
Co-authored-by: Name <[email protected]>
Co-authored-by: Giz <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
6 people authored Nov 15, 2023
1 parent c7f1d92 commit aaf7317
Show file tree
Hide file tree
Showing 17 changed files with 144 additions and 50 deletions.
32 changes: 15 additions & 17 deletions _maps/RandomRuins/SpaceRuins/oldstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2840,13 +2840,6 @@
/obj/structure/cable,
/turf/open/floor/iron,
/area/ruin/space/ancientstation/charlie/hall)
"mm" = (
/obj/machinery/power/supermatter_crystal/shard,
/obj/structure/closet/crate/engineering{
name = "supermatter shard crate"
},
/turf/open/floor/iron/white/textured,
/area/ruin/space/ancientstation/delta/proto)
"mo" = (
/turf/open/floor/iron/white/corner{
dir = 1
Expand Down Expand Up @@ -5152,6 +5145,14 @@
/obj/machinery/light/directional/south,
/turf/open/floor/iron,
/area/ruin/space/ancientstation/beta/hall)
"By" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/computer/monitor,
/obj/effect/turf_decal/tile/yellow/anticorner/contrasted{
dir = 1
},
/turf/open/floor/iron,
/area/ruin/space/ancientstation/charlie/engie)
"Bz" = (
/turf/open/floor/plating/airless,
/area/ruin/space/ancientstation/beta/hall)
Expand Down Expand Up @@ -5963,6 +5964,11 @@
/obj/machinery/duct,
/turf/template_noop,
/area/space/nearstation)
"HS" = (
/obj/machinery/power/supermatter_crystal/shard,
/obj/structure/closet/crate/radiation,
/turf/open/floor/iron/white/textured,
/area/ruin/space/ancientstation/delta/proto)
"HT" = (
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
Expand Down Expand Up @@ -6504,14 +6510,6 @@
/obj/structure/window/reinforced/spawner/directional/south,
/turf/open/floor/engine/o2,
/area/ruin/space/ancientstation/beta/atmos)
"Ll" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/computer/monitor,
/obj/effect/turf_decal/tile/yellow/anticorner/contrasted{
dir = 1
},
/turf/open/floor/iron,
/area/ruin/space/ancientstation/charlie/engie)
"Lm" = (
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
Expand Down Expand Up @@ -11606,7 +11604,7 @@ mS
jE
aa
Ma
Ll
By
eK
fc
Wn
Expand Down Expand Up @@ -14789,7 +14787,7 @@ bD
Yr
cD
uj
mm
HS
Oh
uj
Mx
Expand Down
52 changes: 48 additions & 4 deletions code/game/objects/structures/crates_lockers/crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@
if(isnull(crate_paint_jobs))
crate_paint_jobs = list(
"Internals" = list("icon_state" = "o2crate"),
"Medical" = list("icon_state" = "medicalcrate"),
"Medical" = list("icon_state" = "medical"),
"Medical Plus" = list("icon_state" = "medicalcrate"),
"Radiation" = list("icon_state" = "radiation"),
"Hydrophonics" = list("icon_state" = "hydrocrate"),
"Science" = list("icon_state" = "scicrate"),
"Robotics" = list("icon_state" = "robo"),
"Solar" = list("icon_state" = "engi_e_crate"),
"Engineering" = list("icon_state" = "engi_crate")
"Engineering" = list("icon_state" = "engi_crate"),
"Atmospherics" = list("icon_state" = "atmos"),
"Cargo" = list("icon_state" = "cargo"),
"Mining" = list("icon_state" = "mining"),
"Command" = list("icon_state" = "centcom")
)
if(paint_jobs)
paint_jobs = crate_paint_jobs
Expand Down Expand Up @@ -203,6 +209,10 @@
icon_state = "medicalcrate"
base_icon_state = "medicalcrate"

/obj/structure/closet/crate/medical/department
icon_state = "medical"
base_icon_state = "medical"

/obj/structure/closet/crate/freezer
desc = "A freezer."
name = "freezer"
Expand Down Expand Up @@ -259,6 +269,11 @@
new /obj/item/bodypart/leg/right/robot/surplus(src)
new /obj/item/bodypart/leg/right/robot/surplus(src)

/obj/structure/closet/crate/freezer/food
name = "food icebox"
icon_state = "food"
base_icon_state = "food"

/obj/structure/closet/crate/radiation
desc = "A crate with a radiation sign on it."
name = "radiation crate"
Expand All @@ -271,6 +286,21 @@
icon_state = "hydrocrate"
base_icon_state = "hydrocrate"

/obj/structure/closet/crate/centcom
name = "centcom crate"
icon_state = "centcom"
base_icon_state = "centcom"

/obj/structure/closet/crate/cargo
name = "cargo crate"
icon_state = "cargo"
base_icon_state = "cargo"

/obj/structure/closet/crate/cargo/mining
name = "mining crate"
icon_state = "mining"
base_icon_state = "mining"

/obj/structure/closet/crate/engineering
name = "engineering crate"
icon_state = "engi_crate"
Expand All @@ -280,6 +310,11 @@
icon_state = "engi_e_crate"
base_icon_state = "engi_e_crate"

/obj/structure/closet/crate/engineering/atmos
name = "atmospherics crate"
icon_state = "atmos"
base_icon_state = "atmos"

/obj/structure/closet/crate/rcd
desc = "A crate for the storage of an RCD."
name = "\improper RCD crate"
Expand All @@ -298,10 +333,15 @@
icon_state = "scicrate"
base_icon_state = "scicrate"

/obj/structure/closet/crate/science/robo
name = "robotics crate"
icon_state = "robo"
base_icon_state = "robo"

/obj/structure/closet/crate/mod
name = "MOD crate"
icon_state = "scicrate"
base_icon_state = "scicrate"
icon_state = "robo"
base_icon_state = "robo"

/obj/structure/closet/crate/mod/PopulateContents()
..()
Expand All @@ -325,6 +365,8 @@

/obj/structure/closet/crate/goldcrate
name = "gold crate"
icon_state = "gold"
base_icon_state = "gold"

/obj/structure/closet/crate/goldcrate/PopulateContents()
..()
Expand All @@ -338,6 +380,8 @@

/obj/structure/closet/crate/silvercrate
name = "silver crate"
icon_state = "silver"
base_icon_state = "silver"

/obj/structure/closet/crate/silvercrate/PopulateContents()
..()
Expand Down
35 changes: 33 additions & 2 deletions code/game/objects/structures/crates_lockers/crates/secure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
base_icon_state = "hydrosecurecrate"

/obj/structure/closet/crate/secure/freezer //for consistency with other "freezer" closets/crates
desc = "An insulated crate with a lock on it, used to secure perishables."
name = "secure kitchen crate"
desc = "An icebox with a lock on it, used to secure perishables."
name = "secure kitchen icebox"
icon_state = "kitchen_secure_crate"
base_icon_state = "kitchen_secure_crate"
paint_jobs = null
Expand All @@ -79,18 +79,49 @@
. = ..()
new /obj/effect/spawner/random/food_or_drink/pizzaparty(src)

/obj/structure/closet/crate/secure/centcom
name = "secure centcom crate"
icon_state = "centcom_secure"
base_icon_state = "centcom_secure"

/obj/structure/closet/crate/secure/cargo
name = "secure cargo crate"
icon_state = "cargo_secure"
base_icon_state = "cargo_secure"

/obj/structure/closet/crate/secure/cargo/mining
name = "secure mining crate"
icon_state = "mining_secure"
base_icon_state = "mining_secure"

/obj/structure/closet/crate/secure/radiation
name = "secure radioation crate"
icon_state = "radiation_secure"
base_icon_state = "radiation_secure"

/obj/structure/closet/crate/secure/engineering
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
name = "secure engineering crate"
icon_state = "engi_secure_crate"
base_icon_state = "engi_secure_crate"

/obj/structure/closet/crate/secure/engineering/atmos
name = "secure atmospherics crate"
desc = "A crate with a lock on it, painted in the scheme of the station's atmospherics engineers."
icon_state = "atmos_secure"
base_icon_state = "atmos_secure"

/obj/structure/closet/crate/secure/science
name = "secure science crate"
desc = "A crate with a lock on it, painted in the scheme of the station's scientists."
icon_state = "scisecurecrate"
base_icon_state = "scisecurecrate"

/obj/structure/closet/crate/secure/science/robo
name = "robotics science crate"
icon_state = "robo_secure"
base_icon_state = "robo_secure"

/obj/structure/closet/crate/secure/owned
name = "private crate"
desc = "A crate cover designed to only open for who purchased its contents."
Expand Down
31 changes: 18 additions & 13 deletions code/game/objects/structures/crates_lockers/crates/syndicrate.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/obj/structure/closet/crate/syndicrate
/obj/structure/closet/crate/secure/syndicrate
name = "surplus syndicrate"
desc = "A conspicuous crate with the Syndicate logo on it. You don't know how to open it."
icon_state = "syndicrate"
Expand All @@ -20,7 +20,7 @@
laser = 50
energy = 100

/obj/structure/closet/crate/syndicrate/before_open(mob/living/user, force)
/obj/structure/closet/crate/secure/syndicrate/before_open(mob/living/user, force)
. = ..()
if(!.)
return FALSE
Expand All @@ -31,7 +31,7 @@

return TRUE

/obj/structure/closet/crate/syndicrate/take_damage(damage_amount, damage_type = BRUTE, damage_flag = "", sound_effect = TRUE, attack_dir, armour_penetration = 0)
/obj/structure/closet/crate/secure/syndicrate/take_damage(damage_amount, damage_type = BRUTE, damage_flag = "", sound_effect = TRUE, attack_dir, armour_penetration = 0)
if(created_items)
return ..()
if(damage_amount < DAMAGE_PRECISION)
Expand All @@ -43,7 +43,7 @@
qdel(src)

///ensures that the syndicrate can only be unlocked by opening it with a syndicrate_key
/obj/structure/closet/crate/syndicrate/attackby(obj/item/item, mob/user, params)
/obj/structure/closet/crate/secure/syndicrate/attackby(obj/item/item, mob/user, params)
if(!istype(item, /obj/item/syndicrate_key) || created_items)
return ..()
created_items = TRUE
Expand All @@ -53,17 +53,22 @@
qdel(item)
to_chat(user, span_notice("You twist the key into both locks at once, opening the crate."))
playsound(src, 'sound/machines/boltsup.ogg', 50, vary = FALSE)
update_appearance(updates = UPDATE_OVERLAYS)
togglelock(user)

/obj/structure/closet/crate/syndicrate/attackby_secondary(obj/item/weapon, mob/user, params)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/structure/closet/crate/secure/syndicrate/togglelock(mob/living/user, silent)
if(broken || !created_items)
return
if(iscarbon(user))
add_fingerprint(user)
locked = !locked
user.visible_message(
span_notice("[user] [locked ? "locks" : "unlocks"] [src]."),
span_notice("You [locked ? "locked" : "unlocked"] [src]."),
)
update_appearance()

///syndicrate has a unique overlay for being unlocked
/obj/structure/closet/crate/syndicrate/closet_update_overlays(list/new_overlays)
. = new_overlays
if(created_items)
. += "syndicrate_unlocked"
/obj/structure/closet/crate/secure/syndicrate/attackby_secondary(obj/item/weapon, mob/user, params)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN

/obj/item/syndicrate_key
name = "syndicrate key"
Expand All @@ -79,7 +84,7 @@
/obj/item/syndicrate_key/add_item_context(obj/item/source, list/context, atom/target, mob/living/user)
. = ..()

var/obj/structure/closet/crate/syndicrate/target_structure = target
var/obj/structure/closet/crate/secure/syndicrate/target_structure = target
if(!istype(target_structure))
return NONE
if(target_structure.created_items)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/antagonists/fugitive/hunters/hunter_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

/obj/structure/closet/crate/eva
name = "EVA crate"
icon_state = "o2crate"
base_icon_state = "o2crate"

/obj/structure/closet/crate/eva/PopulateContents()
..()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/bitrunning/objects/loot_crate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
/obj/structure/closet/crate/secure/bitrunning // Base class. Do not spawn this.
name = "base class cache"
desc = "Talk to a coder."
icon_state = "bitrunning"
base_icon_state = "bitrunning"

/// The virtual domain - side of the bitrunning crate. Deliver to the send location.
/obj/structure/closet/crate/secure/bitrunning/encrypted
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cargo/packs/emergency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
access = ACCESS_ATMOSPHERICS
contains = list(/obj/item/watertank/atmos)
crate_name = "firefighting backpack crate"
crate_type = /obj/structure/closet/crate/secure
crate_type = /obj/structure/closet/crate/secure/engineering/atmos

/datum/supply_pack/emergency/internals
name = "Internals Crate"
Expand Down
9 changes: 6 additions & 3 deletions code/modules/cargo/packs/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp,
)
crate_name= "\improper APLU MK-I kit"
crate_type = /obj/structure/closet/crate/science/robo

/datum/supply_pack/engineering/conveyor
name = "Conveyor Assembly Crate"
Expand Down Expand Up @@ -125,6 +126,7 @@
access_view = ACCESS_ATMOSPHERICS
contains = list(/obj/machinery/portable_atmospherics/pump = 2)
crate_name = "portable air pump crate"
crate_type = /obj/structure/closet/crate/secure/engineering/atmos

/datum/supply_pack/engineering/portascrubber
name = "Portable Scrubber Crate"
Expand All @@ -133,6 +135,7 @@
access_view = ACCESS_ATMOSPHERICS
contains = list(/obj/machinery/portable_atmospherics/scrubber = 2)
crate_name = "portable scrubber crate"
crate_type = /obj/structure/closet/crate/secure/engineering/atmos

/datum/supply_pack/engineering/hugescrubber
name = "Huge Portable Scrubber Crate"
Expand All @@ -149,7 +152,7 @@
cost = CARGO_CRATE_VALUE * 2
contains = list(/obj/machinery/space_heater)
crate_name = "space heater crate"
crate_type = /obj/structure/closet/crate/large
crate_type = /obj/structure/closet/crate/secure/engineering/atmos

/datum/supply_pack/engineering/bsa
name = "Bluespace Artillery Parts"
Expand Down Expand Up @@ -266,7 +269,7 @@
access = ACCESS_CE
contains = list(/obj/machinery/power/supermatter_crystal/shard)
crate_name = "supermatter shard crate"
crate_type = /obj/structure/closet/crate/secure/engineering
crate_type = /obj/structure/closet/crate/secure/radiation
dangerous = TRUE

/datum/supply_pack/engine/tesla_coils
Expand All @@ -291,7 +294,7 @@
/obj/item/hfr_box/core,
)
crate_name = "HFR crate"
crate_type = /obj/structure/closet/crate/secure/engineering
crate_type = /obj/structure/closet/crate/secure/engineering/atmos
dangerous = TRUE

/datum/supply_pack/engineering/rad_protection_modules
Expand Down
Loading

0 comments on commit aaf7317

Please sign in to comment.