Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor gun cabinet code adding subtype for all the secure guncabinet/safes #4574

Merged
merged 23 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/game/objects/items/devices/coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
icon_state = "coin_silver"
black_market_value = 25

//CO coin
/obj/item/coin/silver/falcon
name = "falling falcons challenge coin"
desc = "A small coin, bearing the falling falcons insignia."

/obj/item/coin/copper
name = "copper coin"
desc = "A familiar, but cheap form of currency."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ GLOBAL_LIST_EMPTY(co_secure_boxes)

/obj/structure/closet/secure_closet/securecom/Initialize()
. = ..()
new /obj/item/storage/box/kit/honorguard(src)
new /obj/item/storage/box/kit/honorguard(src)
GLOB.co_secure_boxes += src

/obj/structure/closet/secure_closet/securecom/Destroy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,7 @@
contents_explosion(severity - EXPLOSION_THRESHOLD_LOW)
deconstruct(FALSE)

/obj/structure/closet/secure_closet/guncabinet/mp_armory
// req_access = list(ACCESS_MARINE_BRIG)
req_level = SEC_LEVEL_RED

/obj/structure/closet/secure_closet/guncabinet/mp_armory/Initialize()
. = ..()
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/ammo_magazine/shotgun/slugs(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)



//this is used on corsat.(leaving it as a prop i guess)
/obj/structure/closet/secure_closet/guncabinet/riot_control
name = "riot control equipment closet"
// req_access = list(ACCESS_MARINE_BRIG)
Expand Down Expand Up @@ -111,15 +97,10 @@
new /obj/item/clothing/suit/armor/riot/marine(src)
new /obj/item/storage/box/flashbangs(src)


/obj/structure/closet/secure_closet/guncabinet/green
name = "green level gun cabinet"
req_level = SEC_LEVEL_GREEN

/obj/structure/closet/secure_closet/guncabinet/blue
name = "blue level gun cabinet"
req_level = SEC_LEVEL_BLUE

/obj/structure/closet/secure_closet/guncabinet/red
name = "red level gun cabinet"
req_level = SEC_LEVEL_RED
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/obj/structure/closet/secure_closet/guncabinet/blue
name = "blue level gun cabinet"
req_level = SEC_LEVEL_BLUE

//riot gear control cabinet adding vehicle clamp to it to...
// make more sense than in red alert cabinet.

/obj/structure/closet/secure_closet/guncabinet/blue/riot_control
name = "riot control equipment closet"
storage_capacity = 55 //lots of stuff to fit in
req_level = SEC_LEVEL_BLUE

/obj/structure/closet/secure_closet/guncabinet/blue/riot_control/Initialize()
. = ..()
new /obj/item/weapon/gun/shotgun/combat/riot(src, TRUE)
new /obj/item/weapon/gun/shotgun/combat/riot(src, TRUE)
new /obj/item/weapon/gun/shotgun/combat/riot(src, TRUE)
new /obj/item/weapon/shield/riot(src)
new /obj/item/weapon/shield/riot(src)
new /obj/item/weapon/shield/riot(src)
new /obj/item/ammo_magazine/shotgun/beanbag/riot(src)
new /obj/item/ammo_magazine/shotgun/beanbag/riot(src)
new /obj/item/ammo_magazine/shotgun/beanbag/riot(src)
new /obj/item/ammo_magazine/shotgun/beanbag/riot(src)
new /obj/item/weapon/gun/launcher/grenade/m81/riot(src, TRUE)
new /obj/item/storage/box/nade_box/tear_gas(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/head/helmet/riot(src)
new /obj/item/clothing/head/helmet/riot(src)
new /obj/item/clothing/head/helmet/riot(src)
new /obj/item/clothing/suit/armor/riot/marine(src)
new /obj/item/clothing/suit/armor/riot/marine(src)
new /obj/item/clothing/suit/armor/riot/marine(src)
new /obj/item/storage/box/flashbangs(src)
new /obj/item/vehicle_clamp(src)
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/obj/structure/closet/secure_closet/guncabinet/red
name = "red level gun cabinet"
req_level = SEC_LEVEL_RED

// MP ARMORY

// 3 shotgun cabinet are in brig armory
/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_shotgun

/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_shotgun/Initialize()
. = ..()
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/ammo_box/magazine/shotgun/buckshot(src)
new /obj/item/ammo_box/magazine/shotgun(src)

// 2 M39 cabinet are in brig armory (4 M39 and 12 mags)
/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_m39_submachinegun

/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_m39_submachinegun/Initialize()
. = ..()
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/ammo_box/magazine/m39(src)

// 2 m4ra cabinet are in brig armory (m4ra guns and 12 mags)
/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_m4ra_rifle

/obj/structure/closet/secure_closet/guncabinet/red/mp_armory_m4ra_rifle/Initialize()
. = ..()
new /obj/item/weapon/gun/rifle/m4ra(src)
new /obj/item/weapon/gun/rifle/m4ra(src)
new /obj/item/weapon/gun/rifle/m4ra(src)
new /obj/item/weapon/gun/rifle/m4ra(src)
new /obj/item/ammo_box/magazine/m4ra(src)

// EXECUTION CHAMBER might add that here need to ask first... will reskin if asked.



// CIC ARMORY

// 4 shotgun cabinet are in cic armory
/obj/structure/closet/secure_closet/guncabinet/red/cic_armory_shotgun

/obj/structure/closet/secure_closet/guncabinet/red/cic_armory_shotgun/Initialize()
. = ..()
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/ammo_magazine/shotgun/slugs(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)

//4 MK1 cabinet(using guncase because it fit well here it seem)
/obj/structure/closet/secure_closet/guncabinet/red/cic_armory_mk1_rifle

/obj/structure/closet/secure_closet/guncabinet/red/cic_armory_mk1_rifle/Initialize()
. = ..()
new /obj/item/storage/box/guncase/m41aMK1(src)

// UPPER MEDBAY ARMORY

//1 shotgun armory closet 2 guns and 4 mags
/obj/structure/closet/secure_closet/guncabinet/red/armory_shotgun

/obj/structure/closet/secure_closet/guncabinet/red/armory_shotgun/Initialize()
. = ..()
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/weapon/gun/shotgun/combat(src)
new /obj/item/ammo_magazine/shotgun/slugs(src)
new /obj/item/ammo_magazine/shotgun/slugs(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)
new /obj/item/ammo_magazine/shotgun/buckshot(src)

// 2 pistol amory closet maybe to replace with full pistol belt...
/obj/structure/closet/secure_closet/guncabinet/red/armory_m4a3_pistol

/obj/structure/closet/secure_closet/guncabinet/red/armory_m4a3_pistol/Initialize()
. = ..()
new /obj/item/storage/belt/gun/m4a3/full(src)
new /obj/item/storage/belt/gun/m4a3/full(src)
new /obj/item/storage/belt/gun/m4a3/full(src)
new /obj/item/storage/belt/gun/m4a3/full(src)
new /obj/item/ammo_box/magazine/m4a3(src)

// 2 M39 cabinet are in medical armory (4 M39 and 12 mags)
/obj/structure/closet/secure_closet/guncabinet/red/armory_m39_submachinegun

/obj/structure/closet/secure_closet/guncabinet/red/armory_m39_submachinegun/Initialize()
. = ..()
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/weapon/gun/smg/m39(src)
new /obj/item/ammo_box/magazine/m39(src)

// UPPER ENGI ARMORY
// same as medical

// REQ ARMORY
// same as medical

// Small office in hangar armory same as brig armory....
// same as brig armory
25 changes: 25 additions & 0 deletions code/game/objects/structures/safe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,28 @@ FLOOR SAFES

/obj/structure/safe/floor/hide(intact)
invisibility = intact ? 101 : 0

//almayer

/obj/structure/safe/co_office

/obj/structure/safe/co_office/Initialize()
. = ..()
new /obj/item/clothing/glasses/monocle(src)
new /obj/item/book/codebook(src)
new /obj/item/coin/silver/falcon(src)
new /obj/item/weapon/telebaton(src)
new /obj/item/moneybag(src)

/obj/structure/safe/cl_office

/obj/structure/safe/cl_office/Initialize()
. = ..()
new /obj/item/clothing/suit/armor/bulletproof(src)
new /obj/item/weapon/gun/pistol/es4(src)
new /obj/item/ammo_magazine/pistol/es4(src)
new /obj/item/ammo_magazine/pistol/es4(src)
new /obj/item/clothing/accessory/storage/holster(src)
new /obj/item/spacecash/c1000/counterfeit(src)
new /obj/item/spacecash/c1000/counterfeit(src)
new /obj/item/coin/platinum(src)
4 changes: 3 additions & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1248,13 +1248,15 @@ s// DM Environment file for colonialmarines.dme.
#include "code\game\objects\structures\crates_lockers\closets\secure\cm_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\scientist.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\secure_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\security.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet\guncabinet.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet\level_blue.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\guncabinet\level_red.dm"
#include "code\game\objects\structures\pipes\binary_misc.dm"
#include "code\game\objects\structures\pipes\pipes.dm"
#include "code\game\objects\structures\pipes\trinary_misc.dm"
Expand Down
Loading