Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdragonTOW authored Nov 4, 2023
2 parents df8e9c7 + 4ff5112 commit 6571230
Show file tree
Hide file tree
Showing 122 changed files with 47,325 additions and 46,147 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"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@

/// from /obj/item/weapon/gun/proc/load_into_chamber() : ()
#define COMSIG_GUN_INTERRUPT_FIRE "gun_interrupt_fire"

//Additional procs on items that will be triggered right after the human finishes spawns in
#define COMSIG_POST_SPAWN_UPDATE "post_spawn_update"
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
2 changes: 1 addition & 1 deletion code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ See also /datum/surgery_step/saw_off_limb/failure var/list/cannot_hack, listing
#define SURGERY_TOOLS_SEVER_BONE list(\
/obj/item/tool/surgery/circular_saw = SURGERY_TOOL_MULT_IDEAL,\
/obj/item/weapon/twohanded/fireaxe = SURGERY_TOOL_MULT_SUBOPTIMAL,\
/obj/item/weapon/claymore/mercsword/machete = SURGERY_TOOL_MULT_SUBOPTIMAL,\
/obj/item/weapon/sword/machete = SURGERY_TOOL_MULT_SUBOPTIMAL,\
/obj/item/tool/hatchet = SURGERY_TOOL_MULT_SUBSTITUTE,\
/obj/item/tool/kitchen/knife/butcher = SURGERY_TOOL_MULT_SUBSTITUTE,\
/obj/item/attachable/bayonet = SURGERY_TOOL_MULT_BAD_SUBSTITUTE\
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
10 changes: 5 additions & 5 deletions code/datums/components/autofire/autofire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@
if(GUN_FIREMODE_BURSTFIRE)
shots_fired++
if(shots_fired == burst_shots_to_fire)
callback_bursting.Invoke(FALSE)
callback_display_ammo.Invoke()
callback_bursting?.Invoke(FALSE)
callback_display_ammo?.Invoke()
bursting = FALSE
stop_firing()
if(have_to_reset_at_burst_end)//We failed to reset because we were bursting, we do it now
callback_reset_fire.Invoke()
callback_reset_fire?.Invoke()
have_to_reset_at_burst_end = FALSE
return
callback_bursting.Invoke(TRUE)
callback_bursting?.Invoke(TRUE)
bursting = TRUE
next_fire = world.time + burstfire_shot_delay
if(GUN_FIREMODE_AUTOMATIC)
callback_set_firing.Invoke(TRUE)
callback_set_firing?.Invoke(TRUE)
next_fire = world.time + (auto_fire_shot_delay * automatic_delay_mult)
if(GUN_FIREMODE_SEMIAUTO)
return
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"
2 changes: 1 addition & 1 deletion code/datums/supply_packs/black_market.dm
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Primarily made up of things that would be best utilized, well, shipside. Recreat
/obj/item/storage/box/packet/hefa/toy,
/obj/item/toy/inflatable_duck,
/obj/item/toy/beach_ball,
/obj/item/toy/farwadoll,
/obj/item/toy/plush/farwa,
/obj/item/toy/waterflower,
/obj/item/toy/spinningtoy,
/obj/item/storage/box/snappops,
Expand Down
2 changes: 1 addition & 1 deletion code/game/area/WhiskeyOutpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
icon_state = "livingspace"

/area/whiskey_outpost/inside/supply
name = "\improper Supply Depo"
name = "\improper Supply Depot"
icon_state = "req"

/*
Expand Down
10 changes: 5 additions & 5 deletions code/game/gamemodes/colonialmarines/huntergames.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#define HUNTER_GOOD_ITEM pick(\
50; /obj/item/weapon/shield/riot, \
100; /obj/item/weapon/claymore, \
100; /obj/item/weapon/katana, \
100; /obj/item/weapon/sword, \
100; /obj/item/weapon/sword/katana, \
100; /obj/item/weapon/harpoon/yautja, \
150; /obj/item/weapon/claymore/mercsword, \
200; /obj/item/weapon/claymore/mercsword/machete, \
150; /obj/item/weapon/sword, \
200; /obj/item/weapon/sword/machete, \
125; /obj/item/weapon/twohanded/fireaxe, \
\
100; /obj/item/device/binoculars, \
Expand Down Expand Up @@ -51,7 +51,7 @@
300; /obj/item/tool/hatchet, \
100; /obj/item/tool/scythe, \
100; /obj/item/tool/kitchen/knife/butcher, \
50; /obj/item/weapon/katana/replica, \
50; /obj/item/weapon/sword/katana/replica, \
100; /obj/item/weapon/harpoon, \
75; /obj/item/attachable/bayonet, \
200; /obj/item/weapon/throwing_knife, \
Expand Down
79 changes: 67 additions & 12 deletions code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@
OT = "sup" //no breaking anything.

else if (OT == "sup")
randpick = rand(0,50)
randpick = rand(0,90)
switch(randpick)
if(0 to 5)//Marine Gear 10% Chance.
if(0 to 3)//Marine Gear 3% Chance.
crate = new /obj/structure/closet/crate/secure/gear(T)
choosemax = rand(5,10)
randomitems = list(/obj/item/clothing/head/helmet/marine,
Expand All @@ -340,19 +340,19 @@
/obj/effect/landmark/wo_supplies/storage/webbing,
/obj/item/device/binoculars)

if(6 to 10)//Lights and shiet 10%
if(4 to 6)//Lights and shiet 2%
new /obj/structure/largecrate/supply/floodlights(T)
new /obj/structure/largecrate/supply/supplies/flares(T)


if(11 to 13) //6% Chance to drop this !FUN! junk.
if(7 to 10) //3% Chance to drop this !FUN! junk.
crate = new /obj/structure/closet/crate/secure/gear(T)
spawnitems = list(/obj/item/storage/belt/utility/full,
/obj/item/storage/belt/utility/full,
/obj/item/storage/belt/utility/full,
/obj/item/storage/belt/utility/full)

if(14 to 18)//Materials 10% Chance.
if(11 to 22)//Materials 12% Chance.
crate = new /obj/structure/closet/crate/secure/gear(T)
choosemax = rand(3,8)
randomitems = list(/obj/item/stack/sheet/metal,
Expand All @@ -363,15 +363,15 @@
/obj/item/stack/sandbags_empty/half,
/obj/item/stack/sandbags_empty/half)

if(19 to 20)//Blood Crate 4% chance
if(23 to 25)//Blood Crate 2% chance
crate = new /obj/structure/closet/crate/medical(T)
spawnitems = list(/obj/item/reagent_container/blood/OMinus,
/obj/item/reagent_container/blood/OMinus,
/obj/item/reagent_container/blood/OMinus,
/obj/item/reagent_container/blood/OMinus,
/obj/item/reagent_container/blood/OMinus)

if(21 to 25)//Advanced meds Crate 10%
if(26 to 30)//Advanced meds Crate 5%
crate = new /obj/structure/closet/crate/medical(T)
spawnitems = list(/obj/item/storage/firstaid/fire,
/obj/item/storage/firstaid/regular,
Expand All @@ -386,15 +386,15 @@
/obj/item/clothing/glasses/hud/health,
/obj/item/device/defibrillator)

if(26 to 30)//Random Medical Items 10% as well. Made the list have less small junk
if(31 to 34)//Random Medical Items 4%. Made the list have less small junk
crate = new /obj/structure/closet/crate/medical(T)
spawnitems = list(/obj/item/storage/belt/medical/lifesaver/full,
/obj/item/storage/belt/medical/lifesaver/full,
/obj/item/storage/belt/medical/lifesaver/full,
/obj/item/storage/belt/medical/lifesaver/full,
/obj/item/storage/belt/medical/lifesaver/full)

if(31 to 35)//Random explosives Crate 10% because the lord commeth and said let there be explosives.
if(35 to 40)//Random explosives Crate 5% because the lord commeth and said let there be explosives.
crate = new /obj/structure/closet/crate/ammo(T)
choosemax = rand(1,5)
randomitems = list(/obj/item/storage/box/explosive_mines,
Expand All @@ -404,28 +404,83 @@
/obj/item/explosive/grenade/high_explosive,
/obj/item/storage/box/nade_box
)
if(36 to 40) // Junk
if(41 to 44)
crate = new /obj/structure/closet/crate/ammo(T)
spawnitems = list(
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/heavy_barrel)

if(40 to 48)//Weapon + supply beacon drop. 6%
if(45 to 50)//Weapon + supply beacon drop. 5%
crate = new /obj/structure/closet/crate/ammo(T)
spawnitems = list(/obj/item/device/whiskey_supply_beacon,
/obj/item/device/whiskey_supply_beacon,
/obj/item/device/whiskey_supply_beacon,
/obj/item/device/whiskey_supply_beacon)

if(49 to 50)//Rare weapons. Around 4%
if(51 to 57)//Rare weapons. Around 6%
crate = new /obj/structure/closet/crate/ammo(T)
spawnitems = list(/obj/effect/landmark/wo_supplies/ammo/box/rare/m41aap,
/obj/effect/landmark/wo_supplies/ammo/box/rare/m41aapmag,
/obj/effect/landmark/wo_supplies/ammo/box/rare/m41aextend,
/obj/effect/landmark/wo_supplies/ammo/box/rare/smgap,
/obj/effect/landmark/wo_supplies/ammo/box/rare/smgextend)

if(58 to 65) // Sandbags kit
crate = new /obj/structure/closet/crate(T)
spawnitems = list(/obj/item/tool/shovel/etool,
/obj/item/stack/sandbags_empty/half,
/obj/item/stack/sandbags_empty/half,
/obj/item/stack/sandbags_empty/half)

if(66 to 70) // Mortar shells. Pew Pew!
crate = new /obj/structure/closet/crate/secure/mortar_ammo(T)
choosemax = rand(6,10)
randomitems = list(/obj/item/mortar_shell/he,
/obj/item/mortar_shell/incendiary,
/obj/item/mortar_shell/flare,
/obj/item/mortar_shell/frag)

if(71 to 79)
crate = new /obj/structure/closet/crate/ammo(T)
choosemax = rand(2, 3)
randomitems = list(/obj/item/ammo_box/rounds,
/obj/item/ammo_box/rounds/ap,
/obj/item/ammo_box/rounds/smg,
/obj/item/ammo_box/rounds/smg/ap,
/obj/item/ammo_box/magazine/ap,
/obj/item/ammo_box/magazine/ext,
/obj/item/ammo_box/magazine/m4ra/ap,
/obj/item/ammo_box/magazine/m4ra/ap,
/obj/item/ammo_box/magazine/m39/ap,
/obj/item/ammo_box/magazine/m39/ext,
)

if(80 to 82)
crate = new /obj/structure/closet/crate/ammo(T)
choosemax = rand(2, 3)
randomitems = list(/obj/item/ammo_magazine/rifle/lmg/holo_target,
/obj/item/ammo_magazine/rifle/lmg/holo_target,
/obj/item/ammo_magazine/rifle/lmg,
/obj/item/ammo_magazine/rifle/lmg,
)

if(83 to 86)
crate = new /obj/structure/closet/crate/ammo(T)
spawnitems = list(
/obj/item/attachable/magnetic_harness,
/obj/item/attachable/magnetic_harness,
/obj/item/attachable/magnetic_harness,
/obj/item/attachable/magnetic_harness)

if(86 to 90)
crate = new /obj/structure/closet/crate/secure/gear(T)
spawnitems = list(
/obj/item/device/binoculars/range,
/obj/item/device/binoculars/range,
)

if(crate)
crate.storage_capacity = 60

Expand Down
Loading

0 comments on commit 6571230

Please sign in to comment.