Skip to content

Commit

Permalink
adds to cargo and to ship!
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinpachu committed May 18, 2024
1 parent d4b5bd3 commit 30c9b32
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 68 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@
/turf/open/floor/wood/walnut,
/area/ruin/beach/treasure_cove)
"sd" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/effect/turf_decal/industrial/warning{
dir = 4;
color = "#808080"
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@
/turf/open/floor/plasteel/patterned/cargo_one,
/area/ruin/jungle/cavecrew/cargo)
"qz" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/effect/turf_decal/industrial/hatch/yellow,
/obj/effect/turf_decal/industrial/warning{
dir = 10
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/WasteRuins/wasteplanet_pandora.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
/turf/open/floor/mineral/titanium/white,
/area/ruin/wasteplanet)
"kV" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/turf/open/floor/mineral/titanium/white,
/area/ruin/wasteplanet)
"kZ" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/independent/independent_dwayne.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,7 @@
/obj/effect/turf_decal/corner/opaque/yellow/three_quarters{
dir = 4
},
/obj/structure/guncase/shotgun,
/obj/structure/guncloset/shotgun,
/obj/item/gun/ballistic/shotgun/flamingarrow,
/obj/item/gun/ballistic/shotgun/flamingarrow,
/obj/item/gun/ballistic/shotgun/flamingarrow,
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/minutemen/minutemen_vela.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8274,7 +8274,7 @@
/turf/closed/wall/mineral/plastitanium/nodiagonal,
/area/ship/crew/office)
"Th" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/item/gun/ballistic/automatic/pistol/commander,
/obj/item/gun/ballistic/automatic/pistol/commander,
/obj/item/gun/ballistic/automatic/smg/cm5{
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/nanotrasen/nanotrasen_heron.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -11536,7 +11536,7 @@
/turf/open/floor/plasteel,
/area/ship/hallway/aft)
"Rs" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/item/gun/ballistic/automatic/pistol/candor/no_mag,
/obj/item/gun/ballistic/automatic/pistol/candor/no_mag,
/turf/open/floor/plasteel/tech,
Expand Down
4 changes: 2 additions & 2 deletions _maps/shuttles/pirate/pirate_ember.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5621,7 +5621,7 @@
/turf/open/floor/plasteel/dark,
/area/ship/security/armory)
"By" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/item/gun/ballistic/automatic/smg/mini_uzi{
pixel_y = -3
},
Expand Down Expand Up @@ -10204,7 +10204,7 @@
/turf/open/floor/plasteel/tech,
/area/ship/engineering/incinerator)
"VP" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/effect/turf_decal/techfloor,
/obj/item/gun/energy/taser,
/obj/structure/sign/poster/official/ion_carbine{
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/roumain/srm_elder.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@
/turf/open/floor/grass/ship/jungle,
/area/ship/hallway/central)
"ox" = (
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/machinery/door/window/eastright{
dir = 8
},
Expand Down
6 changes: 2 additions & 4 deletions _maps/shuttles/solgov/solgov_chronicle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,8 @@
/obj/item/stamp/solgov,
/obj/item/clothing/suit/armor/solgov_trenchcoat,
/obj/item/spacecash/bundle/loadsamoney,
/obj/item/gun/ballistic/automatic/powered/gauss/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/clothing/neck/cloak/solgovcap,
/obj/item/storage/pistolcase/modelh,
/turf/open/floor/carpet/royalblue,
/area/ship/crew/office)
"cg" = (
Expand Down Expand Up @@ -3730,7 +3728,7 @@
/turf/open/floor/wood/walnut,
/area/ship/crew/crewtwo)
"Ks" = (
/obj/structure/guncase{
/obj/structure/guncloset{
desc = "A locker that holds weapons.";
name = "weapon locker"
},
Expand Down
4 changes: 1 addition & 3 deletions _maps/shuttles/solgov/solgov_inkwell.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5783,10 +5783,8 @@
},
/obj/item/fish_feed,
/obj/item/pen/fountain/solgov,
/obj/item/gun/ballistic/automatic/powered/gauss/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/clothing/neck/cloak/solgovcap,
/obj/item/storage/pistolcase/modelh,
/turf/open/floor/wood/maple,
/area/ship/crew/dorm/dormtwo)
"LJ" = (
Expand Down
4 changes: 1 addition & 3 deletions _maps/shuttles/solgov/solgov_paracelsus.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3580,10 +3580,8 @@
},
/obj/item/fish_feed,
/obj/item/pen/fountain/solgov,
/obj/item/gun/ballistic/automatic/powered/gauss/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/clothing/neck/cloak/solgovcap,
/obj/item/storage/pistolcase/modelh,
/turf/open/floor/carpet/royalblue,
/area/ship/crew)
"IZ" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2730,7 +2730,7 @@
/obj/effect/turf_decal/industrial/fire{
dir = 8
},
/obj/structure/guncase,
/obj/structure/guncloset,
/obj/structure/railing,
/obj/item/gun/ballistic/automatic/smg/c20r,
/obj/machinery/light/directional/east,
Expand Down
9 changes: 3 additions & 6 deletions _maps/shuttles/syndicate/syndicate_twinkleshine.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
/obj/item/megaphone/sec{
name = "syndicate megaphone"
},
/obj/item/gun/ballistic/automatic/pistol/no_mag,
/obj/item/storage/pistolcase/stechkin,
/obj/item/clothing/head/HoS/beret/syndicate,
/obj/item/radio/headset/syndicate/alt/leader,
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
Expand Down Expand Up @@ -1792,7 +1792,7 @@
/obj/item/codespeak_manual{
charges = 2
},
/obj/item/gun/ballistic/revolver,
/obj/item/storage/pistolcase/a357,
/obj/item/megaphone/sec{
name = "syndicate megaphone"
},
Expand All @@ -1804,7 +1804,6 @@
/obj/item/clothing/head/HoS/syndicate,
/obj/item/ammo_box/a357,
/obj/item/ammo_box/a357,
/obj/item/ammo_box/a357,
/turf/open/floor/carpet/nanoweave/red,
/area/ship/crew/dorm/dormtwo)
"ky" = (
Expand Down Expand Up @@ -7339,10 +7338,8 @@
/obj/item/radio/headset/syndicate/alt{
keyslot = null
},
/obj/item/gun/ballistic/automatic/powered/gauss/modelh,
/obj/item/storage/belt/sabre/solgov,
/obj/item/ammo_box/magazine/modelh,
/obj/item/ammo_box/magazine/modelh,
/obj/item/storage/pistolcase/modelh,
/turf/open/floor/mineral/plastitanium,
/area/ship/bridge)
"Qv" = (
Expand Down
74 changes: 69 additions & 5 deletions code/game/objects/items/storage/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
pickup_sound = 'sound/items/handling/toolbox_pickup.ogg'


/obj/item/storage/guncase/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
Expand All @@ -25,6 +26,63 @@
/obj/item/stock_parts/cell/gun
))

/obj/item/storage/guncase/winchester
/obj/item/storage/guncase/winchester/PopulateContents()
new /obj/item/gun/ballistic/shotgun/flamingarrow/no_mag(src)

/obj/item/storage/guncase/skm
/obj/item/storage/guncase/skm/PopulateContents()
new /obj/item/gun/ballistic/automatic/assault/skm/no_mag(src)
new /obj/item/ammo_box/magazine/skm_762_40/empty(src)
new /obj/item/ammo_box/magazine/skm_762_40/empty(src)

/obj/item/storage/guncase/p16
/obj/item/storage/guncase/p16/PopulateContents()
new /obj/item/gun/ballistic/automatic/assault/p16/no_mag(src)
new /obj/item/ammo_box/magazine/p16/empty(src)
new /obj/item/ammo_box/magazine/p16/empty(src)

/obj/item/storage/guncase/beacon
/obj/item/storage/guncase/beacon/PopulateContents()
new /obj/item/gun/ballistic/shotgun/doublebarrel/beacon(src)

/obj/item/storage/guncase/scout
/obj/item/storage/guncase/scout/PopulateContents()
new /obj/item/gun/ballistic/rifle/scout(src)
new /obj/item/ammo_box/a300/empty(src)
new /obj/item/ammo_box/a300/empty(src)

/obj/item/storage/guncase/cobra
/obj/item/storage/guncase/cobra/PopulateContents()
new /obj/item/gun/ballistic/automatic/smg/c20r/cobra/no_mag(src)
new /obj/item/ammo_box/magazine/smgm45/empty(src)
new /obj/item/ammo_box/magazine/smgm45/empty(src)


/obj/item/storage/guncase/hellfire
/obj/item/storage/guncase/hellfire/PopulateContents()
new /obj/item/gun/ballistic/shotgun/hellfire/no_mag(src)

/obj/item/storage/guncase/doublebarrel
/obj/item/storage/guncase/doublebarrel/PopulateContents()
new /obj/item/gun/ballistic/shotgun/doublebarrel/no_mag(src)

/obj/item/storage/guncase/brimstone
/obj/item/storage/guncase/brimstone/PopulateContents()
new /obj/item/gun/ballistic/shotgun/brimstone/no_mag(src)

/obj/item/storage/guncase/illestren
/obj/item/storage/guncase/illestren/PopulateContents()
new /obj/item/gun/ballistic/rifle/illestren/no_mag
new /obj/item/ammo_box/magazine/illestren_a850r/empty(src)
new /obj/item/ammo_box/magazine/illestren_a850r/empty(src)

/obj/item/storage/guncase/wt550
/obj/item/storage/guncase/wt550/PopulateContents()
new /obj/item/gun/ballistic/automatic/smg/wt550(src)
new /obj/item/ammo_box/magazine/wt550m9/empty(src)
new /obj/item/ammo_box/magazine/wt550m9/empty(src)

/obj/item/storage/pistolcase
name = "pistol case"
desc = "A large box designed for holding pistols and magazines safely."
Expand All @@ -44,12 +102,19 @@
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 8
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.set_holdable(list(
/obj/item/gun,
/obj/item/ammo_box/,
/obj/item/stock_parts/cell/gun
))

/obj/item/storage/pistolcase/modelh
/obj/item/storage/pistolcase/modelh/PopulateContents()
new /obj/item/gun/ballistic/automatic/powered/gauss/modelh/no_mag(src)
new /obj/item/ammo_box/magazine/modelh/empty(src)
new /obj/item/ammo_box/magazine/modelh/empty(src)

/obj/item/storage/pistolcase/stechkin
/obj/item/storage/pistolcase/stechkin/PopulateContents()
new /obj/item/gun/ballistic/automatic/pistol/no_mag(src)
Expand Down Expand Up @@ -87,10 +152,9 @@
/obj/item/storage/pistolcase/derringer
/obj/item/storage/pistolcase/derringer/PopulateContents()
new /obj/item/gun/ballistic/derringer/no_mag(src)
new /obj/item/gun/ballistic/derringer/no_mag(src)

/obj/item/storage/pistolcase/a357
/obj/item/storage/pistolcase/derringer/PopulateContents()
/obj/item/storage/pistolcase/a357/PopulateContents()
new /obj/item/gun/ballistic/revolver/no_mag(src)
new /obj/item/ammo_box/a357/empty(src)
new /obj/item/ammo_box/a357/empty(src)
Expand Down Expand Up @@ -122,8 +186,8 @@
new /obj/item/gun/energy/kalix/pistol/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

/obj/item/storage/pistolcase/kalixrifle
/obj/item/storage/pistolcase/kalixrifle/PopulateContents()
/obj/item/storage/guncase/kalixrifle
/obj/item/storage/guncase/kalixrifle/PopulateContents()
new /obj/item/gun/energy/kalix/empty_cell(src)
new /obj/item/stock_parts/cell/gun/kalix(src)

Expand Down
22 changes: 11 additions & 11 deletions code/game/objects/structures/guncase.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//GUNCASES//
/obj/structure/guncase
/obj/structure/guncloset
name = "gun locker"
desc = "A locker that holds guns."
icon = 'icons/obj/closet.dmi'
Expand All @@ -12,7 +12,7 @@
var/open = TRUE
var/capacity = 4

/obj/structure/guncase/Initialize(mapload)
/obj/structure/guncloset/Initialize(mapload)
. = ..()
if(mapload)
for(var/obj/item/I in loc.contents)
Expand All @@ -22,7 +22,7 @@
break
update_appearance()

/obj/structure/guncase/update_overlays()
/obj/structure/guncloset/update_overlays()
. = ..()
if(case_type && LAZYLEN(contents))
var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type)
Expand All @@ -31,7 +31,7 @@
. += new /mutable_appearance(gun_overlay)
. += "[icon_state]_[open ? "open" : "door"]"

/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
/obj/structure/guncloset/attackby(obj/item/I, mob/user, params)
if(iscyborg(user) || isalien(user))
return
if(istype(I, gun_category) && open)
Expand All @@ -50,7 +50,7 @@
else
return ..()

/obj/structure/guncase/attack_hand(mob/user)
/obj/structure/guncloset/attack_hand(mob/user)
. = ..()
if(.)
return
Expand All @@ -68,7 +68,7 @@
* Arguments:
* * user The mob to which we are showing the radial menu
*/
/obj/structure/guncase/proc/show_menu(mob/user)
/obj/structure/guncloset/proc/show_menu(mob/user)
if(!LAZYLEN(contents))
return

Expand Down Expand Up @@ -100,7 +100,7 @@
* Arguments:
* * user The mob interacting with a menu
*/
/obj/structure/guncase/proc/check_menu(mob/living/carbon/human/user)
/obj/structure/guncloset/proc/check_menu(mob/living/carbon/human/user)
if(!open)
return FALSE
if(!istype(user))
Expand All @@ -109,10 +109,10 @@
return FALSE
return TRUE

/obj/structure/guncase/handle_atom_del(atom/A)
/obj/structure/guncloset/handle_atom_del(atom/A)
update_appearance()

/obj/structure/guncase/contents_explosion(severity, target)
/obj/structure/guncloset/contents_explosion(severity, target)
for(var/atom/A in contents)
switch(severity)
if(EXPLODE_DEVASTATE)
Expand All @@ -122,13 +122,13 @@
if(EXPLODE_LIGHT)
SSexplosions.lowobj += A

/obj/structure/guncase/shotgun
/obj/structure/guncloset/shotgun
name = "shotgun locker"
desc = "A locker that holds shotguns."
case_type = "shotgun"
gun_category = /obj/item/gun/ballistic/shotgun

/obj/structure/guncase/ecase
/obj/structure/guncloset/ecase
name = "energy gun locker"
desc = "A locker that holds energy guns."
icon_state = "ecase"
Expand Down
Loading

0 comments on commit 30c9b32

Please sign in to comment.