Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into squad-renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 6, 2023
2 parents 0c0f4aa + ca7a671 commit 3bcfebf
Show file tree
Hide file tree
Showing 203 changed files with 13,547 additions and 11,115 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"
11 changes: 5 additions & 6 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,11 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_PLAYTIME_TIER_4 (175 HOURS)

#define XENO_NO_AGE -1
#define XENO_YOUNG 0
#define XENO_NORMAL 1
#define XENO_MATURE 2
#define XENO_ELDER 3
#define XENO_ANCIENT 4
#define XENO_PRIME 5
#define XENO_NORMAL 0
#define XENO_MATURE 1
#define XENO_ELDER 2
#define XENO_ANCIENT 3
#define XENO_PRIME 4

/// For monthly time tracking
#define JOB_OBSERVER "Observer"
Expand Down
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
4 changes: 2 additions & 2 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@
#define SKILL_DOMESTIC_MAX 2

//multitile vehicle skills
//Can't drive
#define SKILL_VEHICLE_DEFAULT 0

#define SKILL_VEHICLE_DEFAULT 2
//Can drive small vehicles (truck)
#define SKILL_VEHICLE_SMALL 1
//Can drive large vehicles (apc, tank)
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
1 change: 1 addition & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define XENO_HITS_TO_DESTROY_WINDOW_FRAME 3
#define XENO_HITS_TO_DESTROY_R_WINDOW_FRAME 5
#define XENO_HITS_TO_DESTROY_BOLTED_DOOR 10
#define XENO_HITS_TO_DESTROY_DOOR 10
#define XENO_HITS_TO_DESTROY_WELDED_DOOR 15
#define XENO_HITS_TO_EXPOSE_WIRES_MIN 3
#define XENO_HITS_TO_EXPOSE_WIRES_MAX 4
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#define DISTANCE_PENALTY 1
#define ASTAR_COST_FUNCTION(n) (abs(n.x - target.x)+abs(n.y - target.y))

#define OPEN_TURF_PENALTY 1
#define DOOR_PENALTY 3
#define OBJECT_PENALTY 20
#define HUMAN_PENALTY 4
#define XENO_PENALTY 20
#define VEHICLE_PENALTY 25
#define SENTRY_PENALTY 25
#define WINDOW_FRAME_PENALTY 25
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
20 changes: 20 additions & 0 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,19 @@ SUBSYSTEM_DEF(minimaps)
blip.overlays += overlay

images_by_source[target] = blip

for(var/flag in bitfield2list(hud_flags))
minimaps_by_z["[zlevel]"].images_assoc["[flag]"][target] = blip
minimaps_by_z["[zlevel]"].images_raw["[flag]"] += blip

if(ismovableatom(target))
RegisterSignal(target, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(on_z_change))
blip.RegisterSignal(target, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/image, minimap_on_move))

if(isitem(target))
blip.RegisterSignal(target, COMSIG_ITEM_PICKUP, TYPE_PROC_REF(/image, minimap_on_pickup))
blip.RegisterSignal(target, COMSIG_ITEM_DROPPED, TYPE_PROC_REF(/image, minimap_on_drop))

removal_cbs[target] = CALLBACK(src, PROC_REF(removeimage), blip, target)
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_marker))

Expand Down Expand Up @@ -299,6 +306,19 @@ SUBSYSTEM_DEF(minimaps)
pixel_x = MINIMAP_PIXEL_FROM_WORLD(source.x) + SSminimaps.minimaps_by_z["[source_z]"].x_offset
pixel_y = MINIMAP_PIXEL_FROM_WORLD(source.y) + SSminimaps.minimaps_by_z["[source_z]"].y_offset

/image/proc/minimap_on_pickup(obj/item/source, mob/user)
SIGNAL_HANDLER

RegisterSignal(user, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/image, minimap_on_move), override = TRUE)
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)

/image/proc/minimap_on_drop(obj/item/source, mob/user)
SIGNAL_HANDLER

if(recursive_holder_check(source, recursion_limit = 5) != user)
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
RegisterSignal(source, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/image, minimap_on_move))

/**
* Removes an atom and it's blip from the subsystem.
* Force has no effect on this proc, but is here because we are a COMSIG_PARENT_QDELETING handler.
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
/datum/component/ai_behavior_override/attack
behavior_icon_state = "attack_order"

/datum/component/ai_behavior_override/attack/Destroy(force, silent, ...)
for(var/mob/living/carbon/xenomorph/assigned_xeno in currently_assigned)
assigned_xeno.current_target = null

. = ..()

/datum/component/ai_behavior_override/attack/check_behavior_validity(mob/living/carbon/xenomorph/checked_xeno, distance)
. = ..()
if(!.)
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
1 change: 0 additions & 1 deletion code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ United States Colonial Marines
SKILL_LEADERSHIP = SKILL_LEAD_EXPERT,
SKILL_MEDICAL = SKILL_MEDICAL_TRAINED,
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_SMALL,
SKILL_JTAC = SKILL_JTAC_TRAINED,
SKILL_INTEL = SKILL_INTEL_TRAINED,
)
Expand Down
3 changes: 2 additions & 1 deletion code/datums/supply_packs/black_market.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ black market prices are NOT based on real or in-universe costs. they are based o
crate_heat = 5

/obj/structure/largecrate/black_market
fill_from_loc = FALSE
/// Wipes points from objects inside to avoid infinite farming.
var/points_wipe = TRUE
//no special name so it can be hidden
Expand Down Expand Up @@ -585,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
Loading

0 comments on commit 3bcfebf

Please sign in to comment.