Skip to content

Commit

Permalink
Merge remote-tracking branch 'CMSS13/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 6, 2023
2 parents 32b5ab5 + 3c9f6ba commit 394ad4f
Show file tree
Hide file tree
Showing 144 changed files with 11,057 additions and 9,913 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 @@ -65,3 +65,9 @@
#define COMSIG_ATOM_PHONE_RINGING "atom_phone_ringing"
/// From /datum/component/phone/proc/reset_call()
#define COMSIG_ATOM_PHONE_STOPPED_RINGING "atom_phone_stopped_ringing"

/// 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 @@ -38,3 +38,6 @@
#define COMSIG_ITEM_ZOOM "item_zoom"
/// from /obj/item/proc/unzoom() : (mob/user)
#define COMSIG_ITEM_UNZOOM "item_unzoom"

//Additional procs on items that will be triggered right after the human finishes spawns in
#define COMSIG_POST_SPAWN_UPDATE "post_spawn_update"
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
4 changes: 4 additions & 0 deletions code/__DEFINES/urls.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// placeholder strings to be replaced
#define WIKI_PLACEHOLDER "%WIKIURL%"
#define LAW_PLACEHOLDER "%LAWURL%"

// ------ MISC WIKI LINKS ------ //
#define URL_WIKI_LAW "Marine_Law"
#define URL_WIKI_XENO_QUICKSTART "Xeno_Quickstart_Guide"
Expand Down
8 changes: 4 additions & 4 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
#define between(low, middle, high) (max(min(middle, high), low))

//Offuscate x for coord system
#define obfuscate_x(x) (x + obfs_x)
#define obfuscate_x(x) (x + GLOB.obfs_x)

//Offuscate y for coord system
#define obfuscate_y(y) (y + obfs_y)
#define obfuscate_y(y) (y + GLOB.obfs_y)

//Deoffuscate x for coord system
#define deobfuscate_x(x) (x - obfs_x)
#define deobfuscate_x(x) (x - GLOB.obfs_x)

//Deoffuscate y for coord system
#define deobfuscate_y(y) (y - obfs_y)
#define deobfuscate_y(y) (y - GLOB.obfs_y)

#define can_xeno_build(T) (!T.density && !(locate(/obj/structure/fence) in T) && !(locate(/obj/structure/tunnel) in T) && (locate(/obj/effect/alien/weeds) in T))

Expand Down
7 changes: 7 additions & 0 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ GLOBAL_VAR_INIT(time_offset, setup_offset())

/// The last count of possible candidates in the xeno larva queue (updated via get_alien_candidates)
GLOBAL_VAR(xeno_queue_candidate_count)

//Coordinate obsfucator
//Used by the rangefinders and linked systems to prevent coords collection/prefiring
/// A number between -500 and 500.
GLOBAL_VAR(obfs_x)
/// A number between -500 and 500.
GLOBAL_VAR(obfs_y)
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
4 changes: 4 additions & 0 deletions code/controllers/configuration/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
var/static/regex/ic_filter_regex
var/list/fail_to_topic_whitelisted_ips

var/is_loaded = FALSE

/datum/controller/configuration/proc/admin_reload()
if(IsAdminAdvancedProcCall())
alert_proccall("configuration admin_reload")
Expand Down Expand Up @@ -55,6 +57,8 @@
LoadChatFilter()
LoadTopicRateWhitelist()

is_loaded = TRUE

if(Master)
Master.OnConfigLoad()

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
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 @@ -586,7 +586,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
2 changes: 1 addition & 1 deletion code/game/jobs/job/civilians/other/liaison.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
selection_class = "job_cl"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/liaison
entry_message_body = "As a <a href='%WIKIURL%'>representative of Weyland-Yutani Corporation</a>, your job requires you to stay in character at all times. You are not required to follow military orders; however, you cannot give military orders. Your primary job is to observe and report back your findings to Weyland-Yutani. Follow regular game rules unless told otherwise by your superiors. Use your office fax machine to communicate with corporate headquarters or to acquire new directives. You may not receive anything back, and this is normal."
entry_message_body = "As a <a href='"+WIKI_PLACEHOLDER+"'>representative of Weyland-Yutani Corporation</a>, your job requires you to stay in character at all times. You are not required to follow military orders; however, you cannot give military orders. Your primary job is to observe and report back your findings to Weyland-Yutani. Follow regular game rules unless told otherwise by your superiors. Use your office fax machine to communicate with corporate headquarters or to acquire new directives. You may not receive anything back, and this is normal."
var/mob/living/carbon/human/active_liaison

/datum/job/civilian/liaison/generate_entry_conditions(mob/living/liaison, whitelist_status)
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/civilians/other/mess_seargent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
supervisors = "the auxiliary support officer"
gear_preset = /datum/equipment_preset/uscm_ship/chef
entry_message_body = "<a href='%WIKIURL%'>Your job is to service the marines with excellent food</a>, drinks and entertaining the shipside crew when needed. You have a lot of freedom and it is up to you, to decide what to do with it. Good luck!"
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>Your job is to service the marines with excellent food</a>, drinks and entertaining the shipside crew when needed. You have a lot of freedom and it is up to you, to decide what to do with it. Good luck!"

/obj/effect/landmark/start/chef
name = JOB_MESS_SERGEANT
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/civilians/support/cmo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
selection_class = "job_cmo"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/uscm_medical/cmo
entry_message_body = "You're a commissioned officer of the USCM. <a href='%WIKIURL%'>You have authority over everything related to Medbay and Research</a>, only able to be overriden by the XO and CO. You are in charge of medical staff, surgery, chemistry, stimulants and keeping the marines healthy overall."
entry_message_body = "You're a commissioned officer of the USCM. <a href='"+WIKI_PLACEHOLDER+"'>You have authority over everything related to Medbay and Research</a>, only able to be overriden by the XO and CO. You are in charge of medical staff, surgery, chemistry, stimulants and keeping the marines healthy overall."

AddTimelock(/datum/job/civilian/professor, list(
JOB_MEDIC_ROLES = 10 HOURS
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/civilians/support/nurse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
selection_class = "job_doctor"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
gear_preset = /datum/equipment_preset/uscm_ship/uscm_medical/nurse
entry_message_body = "<a href='%WIKIURL%'>You are tasked with keeping the Marines healthy and strong.</a> You are also an expert when it comes to medication and treatment, and can do minor surgical procedures. Focus on assisting doctors and triaging wounded marines."
entry_message_body = "<a href='"+WIKI_PLACEHOLDER+"'>You are tasked with keeping the Marines healthy and strong.</a> You are also an expert when it comes to medication and treatment, and can do minor surgical procedures. Focus on assisting doctors and triaging wounded marines."

/obj/effect/landmark/start/nurse
name = JOB_NURSE
Expand Down
Loading

0 comments on commit 394ad4f

Please sign in to comment.