Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cmss13-devs/cmss13
Browse files Browse the repository at this point in the history
  • Loading branch information
Xander3359 committed Nov 2, 2023
2 parents f8aba18 + ddb5e44 commit 244d5f5
Show file tree
Hide file tree
Showing 57 changed files with 698 additions and 617 deletions.
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@

///When the transform or an atom is varedited through vv topic.
#define COMSIG_ATOM_VV_MODIFY_TRANSFORM "atom_vv_modify_transform"

/// Called when an atom has something mouse dropped on it, from /client/MouseDrop: (atom/dropped_on)
#define COMSIG_ATOM_DROPPED_ON "atom_dropped_on"

/// Called when an atom is mouse dropped on another atom, from /client/MouseDrop: (atom/dropped_onto)
#define COMSIG_ATOM_DROP_ON "atom_drop_on"
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,3 +417,4 @@ var/list/default_xeno_onmob_icons = list(
#define HANDLING_LIMBS list("l_arm","l_hand", "r_arm", "r_hand")
#define EXTREMITY_LIMBS list("l_leg","l_foot","r_leg","r_foot","l_arm","l_hand","r_arm","r_hand")
#define CORE_LIMBS list("chest","head","groin")

10 changes: 6 additions & 4 deletions code/__DEFINES/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@
#define MOBILE_SHUTTLE_ID_ERT_BIG "ert_boarding_shuttle"

#define MOBILE_TRIJENT_ELEVATOR "trijentshuttle2"
#define STAT_TRIJENT_LZ1 "trigent_lz1"
#define STAT_TRIJENT_LZ2 "trigent_lz2"
#define STAT_TRIJENT_ENGI "trigent_engineering"
#define STAT_TRIJENT_OMEGA "trigent_omega"
#define STAT_TRIJENT_EMPTY "trijent_empty"
#define STAT_TRIJENT_OCCUPIED "trijent_occupied"
#define STAT_TRIJENT_LZ1 "trijent_lz1"
#define STAT_TRIJENT_LZ2 "trijent_lz2"
#define STAT_TRIJENT_ENGI "trijent_engineering"
#define STAT_TRIJENT_OMEGA "trijent_omega"

#define MOBILE_SHUTTLE_LIFEBOAT_PORT "lifeboat-port"
#define MOBILE_SHUTTLE_LIFEBOAT_STARBOARD "lifeboat-starboard"
Expand Down
9 changes: 9 additions & 0 deletions code/_onclick/click_hold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,12 @@

// Add the hovered atom to the trace
LAZYADD(mouse_trace_history, over_obj)

/client/MouseDrop(datum/over_object, datum/src_location, over_location, src_control, over_control, params)
. = ..()

if(src_location)
SEND_SIGNAL(src_location, COMSIG_ATOM_DROPPED_ON, over_object, src)

if(over_object)
SEND_SIGNAL(over_object, COMSIG_ATOM_DROP_ON, src_location, src)
20 changes: 20 additions & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
/atom/movable/screen/inventory
var/slot_id //The indentifier for the slot. It has nothing to do with ID cards.

/atom/movable/screen/inventory/Initialize(mapload, ...)
. = ..()

RegisterSignal(src, COMSIG_ATOM_DROPPED_ON, PROC_REF(handle_dropped_on))

/atom/movable/screen/close
name = "close"
Expand Down Expand Up @@ -325,6 +329,22 @@
return 1
return 0

/atom/movable/screen/inventory/proc/handle_dropped_on(atom/dropped_on, atom/dropping, client/user)
SIGNAL_HANDLER

if(slot_id != WEAR_L_HAND && slot_id != WEAR_R_HAND)
return

if(!isstorage(dropping.loc))
return

if(!user.mob.Adjacent(dropping))
return

var/obj/item/storage/store = dropping.loc
store.remove_from_storage(dropping, get_turf(user.mob))
user.mob.put_in_active_hand(dropping)

/atom/movable/screen/throw_catch
name = "throw/catch"
icon = 'icons/mob/hud/human_midnight.dmi'
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SUBSYSTEM_DEF(mapping)
var/list/map_templates = list()

var/list/shuttle_templates = list()
var/list/all_shuttle_templates = list()

var/list/areas_in_z = list()

Expand Down Expand Up @@ -238,6 +239,7 @@ SUBSYSTEM_DEF(mapping)
var/datum/map_template/shuttle/S = new shuttle_type()

shuttle_templates[S.shuttle_id] = S
all_shuttle_templates[item] = S
map_templates[S.shuttle_id] = S

/datum/controller/subsystem/mapping/proc/RequestBlockReservation(width, height, z, type = /datum/turf_reservation, turf_type_override)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/quadtree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
var/z_level

/// Don't divide further when truthy
var/final
var/final_divide = FALSE

/datum/quadtree/New(datum/shape/rectangle/rect, z)
. = ..()
boundary = rect
z_level = z
if(boundary.width <= QUADTREE_BOUNDARY_MINIMUM_WIDTH || boundary.height <= QUADTREE_BOUNDARY_MINIMUM_HEIGHT)
final = TRUE
final_divide = TRUE

// By design i guess, discarding branch discards rest with BYOND soft-GCing
// There should never be anything else but SSquadtree referencing quadtrees,
Expand Down Expand Up @@ -103,7 +103,7 @@
player_coords = list(p_coords)
return TRUE

else if(!final && player_coords.len >= QUADTREE_CAPACITY)
else if(!final_divide && player_coords.len >= QUADTREE_CAPACITY)
if(!is_divided)
subdivide()
if(nw_branch.insert_player(p_coords))
Expand Down
12 changes: 12 additions & 0 deletions code/datums/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@
if(movement_force)
M.movement_force = movement_force.Copy()


/datum/map_template/shuttle/vehicle
shuttle_id = MOBILE_SHUTTLE_VEHICLE_ELEVATOR
name = "Vehicle Elevator"

/datum/map_template/shuttle/trijent_elevator
name = "Trijent Elevator"
shuttle_id = MOBILE_TRIJENT_ELEVATOR
var/elevator_network

/datum/map_template/shuttle/trijent_elevator/A
elevator_network = "A"

/datum/map_template/shuttle/trijent_elevator/B
elevator_network = "B"
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)
Loading

0 comments on commit 244d5f5

Please sign in to comment.