Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed Jul 17, 2024
2 parents 1016335 + df4bb22 commit 246a7ed
Show file tree
Hide file tree
Showing 137 changed files with 2,707 additions and 1,891 deletions.
3,510 changes: 2,036 additions & 1,474 deletions _maps/map_files/Mining/Lavaland.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions _maps/map_files/wawastation/wawastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -55250,6 +55250,7 @@
"tvQ" = (
/obj/structure/chair/sofa/bench,
/obj/effect/landmark/start/prisoner,
/obj/structure/cable,
/turf/open/floor/iron,
/area/station/security/prison)
"twf" = (
Expand Down
7 changes: 1 addition & 6 deletions _maps/virtual_domains/island_brawl.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3466,12 +3466,7 @@
/area/virtual_domain/fullbright)
"Rk" = (
/obj/structure/table/glass,
/obj/machinery/fax{
fax_name = "Beach Hotel Fax";
name = "Beach Hotel's Fax Machine";
pixel_y = 8;
visible_to_network = 0
},
/obj/item/storage/box/donkpockets,
/turf/open/floor/iron/dark/diagonal,
/area/virtual_domain)
"Rs" = (
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#define SPAN_SINGING "singing"
#define SPAN_TAPE_RECORDER "tape_recorder"
#define SPAN_SMALL_VOICE "small"

#define SPAN_SOAPBOX "soapbox"
//bitflag #defines for return value of the radio() proc.
/// Makes the message use italics
#define ITALICS (1<<0)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#define span_small(str) ("<span class='small'>" + str + "</span>")
#define span_smallnotice(str) ("<span class='smallnotice'>" + str + "</span>")
#define span_smallnoticeital(str) ("<span class='smallnoticeital'>" + str + "</span>")
#define span_soapbox(str) ("<span class='soapbox'>" + str + "</span>")
#define span_spiderbroodmother(str) ("<span class='spiderbroodmother'>" + str + "</span>")
#define span_spiderscout(str) ("<span class='spiderscout'>" + str + "</span>")
#define span_spiderbreacher(str) ("<span class='spiderbreacher'>" + str + "</span>")
Expand Down
9 changes: 6 additions & 3 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,12 @@
#define SSEXPLOSIONS_THROWS 3

// Machines subsystem subtasks.
#define SSMACHINES_APCS_EARLY 1
#define SSMACHINES_MACHINES 2
#define SSMACHINES_APCS_LATE 3
#define SSMACHINES_MACHINES 1
#define SSMACHINES_APCS_EARLY 2
#define SSMACHINES_APCS_ENVIRONMENT 3
#define SSMACHINES_APCS_LIGHTS 4
#define SSMACHINES_APCS_EQUIPMENT 5
#define SSMACHINES_APCS_LATE 6

// Wardrobe subsystem tasks
#define SSWARDROBE_STOCK 1
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
// Trait added to the user of a hippocratic oath status effect
#define TRAIT_HIPPOCRATIC_OATH "hippocratic_oath"
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
#define TRAIT_IGNOREDAMAGESLOWDOWN "ignoredamageslowdown"
/// Makes it so the mob can use guns regardless of tool user status
#define TRAIT_GUN_NATURAL "gunnatural"
/// Causes death-like unconsciousness
Expand Down Expand Up @@ -234,6 +233,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_EXAMINE_FITNESS "reveal_power_level"
/// These mobs have particularly hygienic tongues
#define TRAIT_WOUND_LICKER "wound_licker"
/// Mobs with this trait are allowed to use silicon emotes
#define TRAIT_SILICON_EMOTES_ALLOWED "silicon_emotes_allowed"

/// This trait designate that the mob was originally a monkey
#define TRAIT_BORN_MONKEY "born_as_a_monkey"
Expand Down Expand Up @@ -972,6 +973,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

/// changelings with this trait can no longer talk over the hivemind
#define TRAIT_CHANGELING_HIVEMIND_MUTE "ling_mute"
/// This guy is a hulk! (Bulky and green, lacks tact)
#define TRAIT_HULK "hulk"
/// Isn't attacked harmfully by blob structures
#define TRAIT_BLOB_ALLY "blob_ally"
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/traits/sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@
#define SPEED_TRAIT "speed_trait"
/// Trait given to mobs that have been autopsied
#define AUTOPSY_TRAIT "autopsy_trait"
/// Trait given by [/datum/status_effect/blessing_of_insanity]
#define MAD_WIZARD_TRAIT "mad_wizard_trait"

///From the market_crash event
#define MARKET_CRASH_EVENT_TRAIT "crashed_market_event"
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/lists/maintenance_loot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ GLOBAL_LIST_INIT(rarity_loot, list(//rare: really good items
list(//equipment
/obj/item/clothing/glasses/hud/security = 1,
/obj/item/clothing/glasses/sunglasses = 1,
/obj/item/clothing/gloves/color/black = 1,
/obj/item/clothing/gloves/color/black/security = 1,
/obj/item/clothing/gloves/color/yellow = 1,
/obj/item/clothing/gloves/tackler/combat = 1,
/obj/item/clothing/head/helmet/toggleable/justice = 1,
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_HUSK" = TRAIT_HUSK,
"TRAIT_ID_APPRAISER" = TRAIT_ID_APPRAISER,
"TRAIT_IGNORE_ELEVATION" = TRAIT_IGNORE_ELEVATION,
"TRAIT_IGNOREDAMAGESLOWDOWN" = TRAIT_IGNOREDAMAGESLOWDOWN,
"TRAIT_IGNORESLOWDOWN" = TRAIT_IGNORESLOWDOWN,
"TRAIT_IGNORING_GRAVITY" = TRAIT_IGNORING_GRAVITY,
"TRAIT_ILLITERATE" = TRAIT_ILLITERATE,
Expand Down Expand Up @@ -439,6 +438,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_SILICON_EMOTES_ALLOWED" = TRAIT_SILICON_EMOTES_ALLOWED,
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
"TRAIT_SKITTISH" = TRAIT_SKITTISH,
"TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE,
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_HOLY" = TRAIT_HOLY,
"TRAIT_HUSK" = TRAIT_HUSK,
"TRAIT_IGNORE_ELEVATION" = TRAIT_IGNORE_ELEVATION,
"TRAIT_IGNOREDAMAGESLOWDOWN" = TRAIT_IGNOREDAMAGESLOWDOWN,
"TRAIT_IGNORESLOWDOWN" = TRAIT_IGNORESLOWDOWN,
"TRAIT_ILLITERATE" = TRAIT_ILLITERATE,
"TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED,
Expand Down Expand Up @@ -200,6 +199,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_SIGN_LANG" = TRAIT_SIGN_LANG,
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_SILICON_EMOTES_ALLOWED" = TRAIT_SILICON_EMOTES_ALLOWED,
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
"TRAIT_SKITTISH" = TRAIT_SKITTISH,
"TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE,
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
using = new /atom/movable/screen/resist(null, src)
using.icon = ui_style
using.screen_loc = ui_above_movement
using.update_appearance()
hotkeybuttons += using

throw_icon = new /atom/movable/screen/throw_catch(null, src)
Expand Down
3 changes: 1 addition & 2 deletions code/_onclick/hud/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@

///Set the HUD in New, as lobby screens are made before Atoms are Initialized.
/atom/movable/screen/lobby/New(loc, datum/hud/our_hud, ...)
if(our_hud)
hud = our_hud
set_new_hud(our_hud)
return ..()

///Run sleeping actions after initialize
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/parallax/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/parallax_layer)
. = ..()
// Parallax layers are independant of hud, they care about client
// Not doing this will just create a bunch of hard deletes
hud = null
set_new_hud(hud_owner = null)

if(template)
return
Expand Down
20 changes: 18 additions & 2 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@

/atom/movable/screen/Initialize(mapload, datum/hud/hud_owner)
. = ..()
if(hud_owner && istype(hud_owner))
hud = hud_owner
if(isnull(hud_owner)) //some screens set their hud owners on /new, this prevents overriding them with null post atoms init
return
set_new_hud(hud_owner)

/atom/movable/screen/Destroy()
master_ref = null
Expand All @@ -72,10 +73,25 @@
/atom/movable/screen/proc/component_click(atom/movable/screen/component_button/component, params)
return

///setter used to set our new hud
/atom/movable/screen/proc/set_new_hud(datum/hud/hud_owner)
if(hud)
UnregisterSignal(hud, COMSIG_QDELETING)
if(isnull(hud_owner))
hud = null
return
hud = hud_owner
RegisterSignal(hud, COMSIG_QDELETING, PROC_REF(on_hud_delete))

/// Returns the mob this is being displayed to, if any
/atom/movable/screen/proc/get_mob()
return hud?.mymob

/atom/movable/screen/proc/on_hud_delete(datum/source)
SIGNAL_HANDLER

set_new_hud(hud_owner = null)

/atom/movable/screen/text
icon = null
icon_state = null
Expand Down
56 changes: 30 additions & 26 deletions code/controllers/subsystem/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ SUBSYSTEM_DEF(machines)
VAR_PRIVATE/list/all_machines = list()

var/list/processing = list()
var/list/processing_apcs = list()

var/list/currentrun = list()
var/list/apc_early_processing = list()
var/list/apc_late_processing = list()
var/current_part = SSMACHINES_APCS_EARLY
var/current_part = SSMACHINES_MACHINES
var/list/apc_steps = list(
SSMACHINES_APCS_ENVIRONMENT,
SSMACHINES_APCS_LIGHTS,
SSMACHINES_APCS_EQUIPMENT,
SSMACHINES_APCS_EARLY,
SSMACHINES_APCS_LATE
)
///List of all powernets on the server.
var/list/datum/powernet/powernets = list()

Expand Down Expand Up @@ -82,25 +89,10 @@ SUBSYSTEM_DEF(machines)
if (!resumed)
for(var/datum/powernet/powernet as anything in powernets)
powernet.reset() //reset the power state.
current_part = SSMACHINES_APCS_EARLY
src.currentrun = apc_early_processing.Copy()

//APC early processing. Draws static power usages from their grids.
if(current_part == SSMACHINES_APCS_EARLY)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/machinery/power/apc/apc = currentrun[currentrun.len]
currentrun.len--
if(QDELETED(apc) || apc.early_process(wait * 0.1) == PROCESS_KILL)
apc_early_processing -= apc
apc.datum_flags &= ~DF_ISPROCESSING
if(MC_TICK_CHECK)
return
current_part = SSMACHINES_MACHINES
src.currentrun = processing.Copy()

//General machine processing. Their power usage can be dynamic and based on surplus power, so they come after static power usage have been applied.
//Processing all machines
if(current_part == SSMACHINES_MACHINES)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
Expand All @@ -112,22 +104,34 @@ SUBSYSTEM_DEF(machines)
thing.datum_flags &= ~DF_ISPROCESSING
if (MC_TICK_CHECK)
return
current_part = SSMACHINES_APCS_LATE
src.currentrun = apc_late_processing.Copy()
current_part = apc_steps[1]
src.currentrun = processing_apcs.Copy()

//APC late processing. APCs will use the remaining power on the grid to charge their cells if needed.
//This is applied at the end so charging APCs don't cause others to discharge by taking all the power from the grid before machines use power.
if(current_part == SSMACHINES_APCS_LATE)
//Processing APCs
while(current_part in apc_steps)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/machinery/power/apc/apc = currentrun[currentrun.len]
currentrun.len--
if(QDELETED(apc) || apc.late_process(wait * 0.1) == PROCESS_KILL)
apc_late_processing -= apc
if(QDELETED(apc))
processing_apcs -= apc
apc.datum_flags &= ~DF_ISPROCESSING
switch(current_part)
if(SSMACHINES_APCS_EARLY)
apc.early_process(wait * 0.1)
if(SSMACHINES_APCS_LATE)
apc.charge_channel(null, wait * 0.1)
apc.late_process(wait * 0.1)
else
apc.charge_channel(current_part, wait * 0.1)
if(MC_TICK_CHECK)
return
var/next_index = apc_steps.Find(current_part) + 1
if (next_index > apc_steps.len)
return
current_part = apc_steps[next_index]
src.currentrun = processing_apcs.Copy()

/datum/controller/subsystem/machines/proc/setup_template_powernets(list/cables)
var/obj/structure/cable/PC
Expand Down
42 changes: 42 additions & 0 deletions code/datums/components/soapbox.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/datum/component/soapbox
/// List of our current soapboxxer(s) who are gaining loud speech
var/list/soapboxers = list()
/// Gives atoms moving over us the soapbox speech and takes it away when they leave
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_loc_entered),
COMSIG_ATOM_EXITED = PROC_REF(on_loc_exited)
)

/datum/component/soapbox/Initialize(...)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
add_connect_loc_behalf_to_parent()
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(parent_moved))

///Applies loud speech to our movable when entering the turf our parent is on
/datum/component/soapbox/proc/on_loc_entered(datum/source, atom/movable/soapbox_arrive)
SIGNAL_HANDLER
RegisterSignal(soapbox_arrive, COMSIG_MOB_SAY, PROC_REF(soapbox_speech))
soapboxers += soapbox_arrive

///Takes away loud speech from our movable when it leaves the turf our parent is on
/datum/component/soapbox/proc/on_loc_exited(datum/source, atom/movable/soapbox_leave)
SIGNAL_HANDLER
if(soapbox_leave in soapboxers)
UnregisterSignal(soapbox_leave, COMSIG_MOB_SAY)
soapboxers -= soapbox_leave

///We don't want our soapboxxer to keep their loud say if the parent is moved out from under them
/datum/component/soapbox/proc/parent_moved(datum/source)
SIGNAL_HANDLER
for(var/atom/movable/loud as anything in soapboxers)
UnregisterSignal(loud, COMSIG_MOB_SAY)
soapboxers = list()

///Gives a mob a unique say span
/datum/component/soapbox/proc/soapbox_speech(datum/source, list/speech_args)
SIGNAL_HANDLER
speech_args[SPEECH_SPANS] |= SPAN_SOAPBOX

/datum/component/soapbox/proc/add_connect_loc_behalf_to_parent()
AddComponent(/datum/component/connect_loc_behalf, parent, loc_connections)
12 changes: 4 additions & 8 deletions code/datums/components/style/style.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@

rank = rank_changed
meter.maptext = "[format_rank_string(rank)][generate_multiplier()][generate_actions()]"
meter.maptext_y = 100 - 9 * length(actions)
meter.maptext_y = 94 - 12 * length(actions)
update_meter(point_to_rank(), go_back)

/datum/component/style/proc/update_meter(new_rank, go_back)
Expand Down Expand Up @@ -270,19 +270,15 @@
return "SPACED!"

/datum/component/style/proc/format_rank_string(new_rank)
var/rank_string = rank_to_string(new_rank)
var/final_string = ""
final_string += "<span class='maptext' style='font-size: 8px'><font color='[rank_to_color(new_rank)]'><b>[rank_string[1]]</b>"
final_string += "<span style='font-size: 7px'>[copytext(rank_string, 2)]</span></font></span>"
return final_string
return MAPTEXT_PIXELLARI("<font color='[rank_to_color(new_rank)]'>[rank_to_string(new_rank)]</font>")

/datum/component/style/proc/generate_multiplier()
return "<br><span class='maptext' style='font-size: 7px'>MULTIPLIER: [point_multiplier]X</span>"
return "<br>" + MAPTEXT_GRAND9K("MULTIPLIER: [point_multiplier]X")

/datum/component/style/proc/generate_actions()
var/action_string = ""
for(var/action in actions)
action_string += "<br><span class='maptext'>+ <font color='[action_to_color(actions[action])]'>[actions[action]]</font></span>"
action_string += "<br>" + MAPTEXT_GRAND9K("+ <font color='[action_to_color(actions[action])]'>[actions[action]]</font>")
return action_string

/datum/component/style/proc/action_to_color(action)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/style/style_meter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
maptext_height = 120
maptext_width = 105
maptext_x = 5
maptext_y = 100
maptext_y = 94
maptext = ""
layer = SCREENTIP_LAYER

Expand Down
5 changes: 4 additions & 1 deletion code/datums/components/tackle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
src.min_distance = min_distance

var/mob/P = parent
to_chat(P, span_notice("You are now able to launch tackles! You can do so by activating throw mode, and clicking on your target with an empty hand."))
to_chat(P, span_notice("You are now able to launch tackles! You can do so by activating throw mode, and ") + span_boldnotice("RIGHT-CLICKING on your target with an empty hand."))

addtimer(CALLBACK(src, PROC_REF(resetTackle)), base_knockdown, TIMER_STOPPABLE)

Expand Down Expand Up @@ -74,6 +74,9 @@
if(modifiers[ALT_CLICK] || modifiers[SHIFT_CLICK] || modifiers[CTRL_CLICK] || modifiers[MIDDLE_CLICK])
return

if(!modifiers[RIGHT_CLICK])
return

if(!user.throw_mode || user.get_active_held_item() || user.pulling || user.buckled || user.incapacitated())
return

Expand Down
Loading

0 comments on commit 246a7ed

Please sign in to comment.