Skip to content

Commit

Permalink
Refactor gun cabinet code adding subtype for all the secure guncabine…
Browse files Browse the repository at this point in the history
…t/safes (#4574)

# About the pull request
going to add some subtype for other closets...
chem safes execution....
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
no more mapping change to change content...
meaning less conflict in the future if we want to change themalso it's
more clean
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
refactor: Refactor gun cabinet code adding subtype for all the secure
guncabinet.
refactor: Refactor safe code adding subtype for cl and co safes also add
a subtype for armory honor guard closet .
/:cl:

---------

Co-authored-by: Julien <[email protected]>
  • Loading branch information
Huffie56 and Julien authored Nov 1, 2023
1 parent 97e8fd2 commit d0f31d3
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 265 deletions.
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 @@ -26,6 +26,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 @@ -1285,13 +1285,15 @@
#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

0 comments on commit d0f31d3

Please sign in to comment.