Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into vehicle-autofire
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Nov 7, 2023
2 parents 4416030 + ca7a671 commit 56332da
Show file tree
Hide file tree
Showing 174 changed files with 13,216 additions and 10,803 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"
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@

// from /proc/update_living_queens() : /mob/living/carbon/xenomorph/queen
#define COMSIG_HIVE_NEW_QUEEN "hive_new_queen"

/// From /datum/game_master_submenu/vents/proc/setup_ambush()
#define COMSIG_GAME_MASTER_AMBUSH_SET "game_master_ambush_set"
1 change: 0 additions & 1 deletion code/__DEFINES/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// How slow we go from losing a limb
#define MOVE_REDUCTION_LIMB_DESTROYED 4
#define MOVE_REDUCTION_LIMB_BROKEN 1.5
#define MOVE_REDUCTION_DIRECTION_LOCKED 1
#define MOVE_REDUCTION_LIMB_SPLINTED 0.5

// Traumatic shock reduction for different reagents
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
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
60 changes: 60 additions & 0 deletions code/datums/components/atom_narrate.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#define NARRATION_METHOD_SAY "Say"
#define NARRATION_METHOD_ME "Me"
#define NARRATION_METHOD_DIRECT "Direct"

/datum/component/atom_narrate
var/message
var/narration_type
var/narrator

/datum/component/atom_narrate/Initialize(message, narration_type, delayed, narrator)
. = ..()

src.message = message
src.narration_type = narration_type
src.narrator = narrator

if(!delayed)
send_narration()
return

var/turf/parent_turf = get_turf(parent)

if(!parent_turf)
return COMPONENT_INCOMPATIBLE

var/list/message_turfs = block(locate(max(parent_turf.x - 4, 1), max(parent_turf.y - 4, 1), parent_turf.z), locate(parent_turf.x + 4, parent_turf.y + 4, parent_turf.z))

for(var/turf/cycled_turf as anything in message_turfs)
RegisterSignal(cycled_turf, COMSIG_TURF_ENTERED, PROC_REF(send_message_on_movement))

/datum/component/atom_narrate/proc/send_message_on_movement(turf/source, atom/movable/entered)
SIGNAL_HANDLER

if(!istype(entered, /mob/living/carbon/human))
return

send_narration()
qdel(src)

/datum/component/atom_narrate/proc/send_narration()
var/atom/atom_parent = parent

if(!atom_parent)
qdel(src)
return

var/list/heard = get_mobs_in_view(world_view_size, atom_parent)

switch(narration_type)
if(NARRATION_METHOD_SAY)
atom_parent.langchat_speech(message, heard, GLOB.all_languages, skip_language_check = TRUE)
atom_parent.visible_message("<b>[atom_parent]</b> says, \"[message]\"")
if(NARRATION_METHOD_ME)
atom_parent.langchat_speech(message, heard, GLOB.all_languages, skip_language_check = TRUE, animation_style = 2, additional_styles = list("langchat_small", "emote"))
atom_parent.visible_message("<b>[atom_parent]</b> [message]")
if(NARRATION_METHOD_DIRECT)
atom_parent.visible_message("[message]")

log_admin("[narrator] sent an Atom Narrate with message \"[message]\" from [atom_parent].")
message_admins("[narrator] sent an Atom Narrate with message \"[message]\" from [atom_parent].")
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/components/phone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)
/datum/component/phone/virtual/ui_status(mob/user, datum/ui_state/state)
return UI_INTERACTIVE

/datum/component/phone/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
/datum/component/phone/virtual/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/langchat/langchat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
if(langchat_client_enabled(M) && !M.ear_deaf && (skip_language_check || M.say_understands(src, language)))
M.client.images += langchat_image

if(isturf(loc))
if(isturf(src) || isturf(loc))
langchat_image.loc = src
else
langchat_image.loc = recursive_holder_check(src)
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
7 changes: 3 additions & 4 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,9 @@ Parameters are passed from New.
/atom/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "-----ATOM-----")
if(!ismovable(src))
var/turf/curturf = get_turf(src)
if(curturf)
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
var/turf/curturf = get_turf(src)
if(curturf)
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRANSFORM, "Modify Transform")
VV_DROPDOWN_OPTION(VV_HK_ADD_REAGENT, "Add Reagent")
VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EMP, "EMP Pulse")
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
Loading

0 comments on commit 56332da

Please sign in to comment.