Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/ChaoticOnyx/OnyxBay into etr…
Browse files Browse the repository at this point in the history
…epot
  • Loading branch information
TobyThorne committed Apr 2, 2024
2 parents 4f2f0f9 + a8a6c0b commit dc39aa9
Show file tree
Hide file tree
Showing 25 changed files with 169 additions and 45 deletions.
7 changes: 7 additions & 0 deletions code/__defines/_render.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/renderer)
switch(quality)
if(GLOB.PREF_LOW)
gas_heat_object = new /atom/movable/heat_effect(null)
steam_object = new /atom/movable/steam_effect(null)
if(GLOB.PREF_MED)
gas_heat_object = new /atom/movable/particle_emitter/heat(null)
steam_object = new /atom/movable/particle_emitter/steam(null)
Expand All @@ -343,6 +344,12 @@ INITIALIZE_IMMEDIATE(/atom/movable/renderer)
render_target = HEAT_EFFECT_TARGET
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE

/atom/movable/steam_effect
icon = 'icons/effects/effects.dmi'
icon_state = "smoke"
appearance_flags = PIXEL_SCALE | NO_CLIENT_COLOR
render_target = STEAM_EFFECT_TARGET
mouse_opacity = MOUSE_OPACITY_UNCLICKABLE

/* *
* This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ var/const/CLICK_HANDLER_ALL = (~0)
..()
src.user = user
if(flags & (CLICK_HANDLER_REMOVE_ON_MOB_LOGOUT))
register_signal(user, SIGNAL_LOGGED_OUT, /datum/click_handler/proc/OnMobLogout)
register_signal(user, SIGNAL_LOGGED_OUT, nameof(/datum/click_handler.proc/OnMobLogout))

/datum/click_handler/Destroy()
if(flags & (CLICK_HANDLER_REMOVE_ON_MOB_LOGOUT))
unregister_signal(user, SIGNAL_LOGGED_OUT, /datum/click_handler/proc/OnMobLogout)
unregister_signal(user, SIGNAL_LOGGED_OUT, nameof(/datum/click_handler.proc/OnMobLogout))
user = null
. = ..()

Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
thealert.timeout = null

thealert.owner = src
thealert.register_signal(thealert.owner, SIGNAL_QDELETING, /datum/proc/qdel_self)
thealert.register_signal(thealert.owner, SIGNAL_QDELETING, nameof(/datum.proc/qdel_self))

if(new_master)
var/old_layer = new_master.layer
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/statpanels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ SUBSYSTEM_DEF(statpanels)
// Now, we're gonna queue image generation out of those refs
to_make += turf_item
already_seen[turf_item] = OBJ_IMAGE_LOADING
obj_window.register_signal(turf_item, SIGNAL_QDELETING, nameof(/datum/object_window_info/proc/viewing_atom_deleted)) // we reset cache if anything in it gets deleted
obj_window.register_signal(turf_item, SIGNAL_QDELETING, nameof(/datum/object_window_info.proc/viewing_atom_deleted)) // we reset cache if anything in it gets deleted

return turf_items

Expand Down
2 changes: 1 addition & 1 deletion code/datums/appearances/automatic/cardborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

var/image/I = get_image_from_backpack(H)
AddAltAppearance(H, I, GLOB.silicon_mob_list+H) //you look like a robot to robots! (including yourself because you're totally a robot)
register_global_signal(SIGNAL_LOGGED_IN, /decl/appearance_handler/cardborg/proc/mob_joined) // Duplicate registration request are handled for us
register_global_signal(SIGNAL_LOGGED_IN, nameof(/decl/appearance_handler/cardborg.proc/mob_joined)) // Duplicate registration request are handled for us

/decl/appearance_handler/cardborg/proc/item_removed(obj/item/item, mob/user)
if((istype(item, /obj/item/clothing/suit/cardborg) || istype(item, /obj/item/clothing/head/cardborg)) || istype(item, /obj/item/storage/backpack))
Expand Down
6 changes: 4 additions & 2 deletions code/datums/sound_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,16 @@ GLOBAL_DATUM_INIT(sound_player, /decl/sound_player, new)
null_sound = null_sound || new(channel = sound.channel)
sound_to(listener, null_sound)
unregister_signal(listener, SIGNAL_MOVED)
unregister_signal(listener, SIGNAL_QDELETING, /datum/sound_token/proc/PrivRemoveListener)
unregister_signal(listener, SIGNAL_QDELETING, nameof(/datum/sound_token.proc/PrivRemoveListener))
listeners -= listener

/datum/sound_token/proc/PrivUpdateListenerLoc(atom/listener, update_sound = TRUE)
var/turf/source_turf = get_turf(source)
var/turf/listener_turf = get_turf(listener)

ASSERT(istype(source_turf) && istype(listener_turf))
if(!istype(source_turf) && !istype(listener_turf)) // Oh look somebody's got nullspace'd
PrivRemoveListener(listener)
return

var/distance = get_dist(source_turf, listener_turf)
if(!listener_turf || (distance > range) || !(listener_turf in can_be_heard_from))
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/godmode/form_items/narsie_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
if(ismob(a))
var/mob/M = a
if(!M.is_ooc_dead())
register_signal(M, SIGNAL_MOB_DEATH, /obj/item/material/twohanded/fireaxe/cult/proc/gain_power)
register_signal(M, SIGNAL_MOB_DEATH, nameof(/obj/item/material/twohanded/fireaxe/cult.proc/gain_power))
spawn(30)
unregister_signal(M, SIGNAL_MOB_DEATH)
return ..()
Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/godmode/god_altar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
set_next_think(world.time + 1 SECOND)
target = L
update_icon()
register_signal(L, SIGNAL_QDELETING, /obj/structure/deity/altar/proc/remove_target)
register_signal(L, SIGNAL_MOVED, /obj/structure/deity/altar/proc/remove_target)
register_signal(L, SIGNAL_MOB_DEATH, /obj/structure/deity/altar/proc/remove_target)
register_signal(L, SIGNAL_QDELETING, nameof(/obj/structure/deity/altar.proc/remove_target))
register_signal(L, SIGNAL_MOVED, nameof(/obj/structure/deity/altar.proc/remove_target))
register_signal(L, SIGNAL_MOB_DEATH, nameof(/obj/structure/deity/altar.proc/remove_target))

/obj/structure/deity/altar/proc/remove_target()
set_next_think(0)
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/godmode/god_pylon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
return
to_chat(L, "<span class='notice'>You place your hands on \the [src], feeling yourself intune to its vibrations.</span>")
intuned += L
register_signal(L, SIGNAL_QDELETING, /obj/structure/deity/pylon/proc/remove_intuned)
register_signal(L, SIGNAL_QDELETING, nameof(/obj/structure/deity/pylon.proc/remove_intuned))

/obj/structure/deity/pylon/proc/remove_intuned(mob/living/L)
if(!(L in intuned))
Expand Down
57 changes: 45 additions & 12 deletions code/game/machinery/atmoalter/sauna.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@
icon = 'icons/obj/machines/sauna.dmi'
icon_state = "sauna"
base_icon_state = "sauna"
obj_flags = OBJ_FLAG_ANCHORABLE
use_power = POWER_USE_IDLE
density = TRUE
anchored = TRUE
stat = POWEROFF // Disabled at roundstart

component_types = list(
/obj/item/circuitboard/sauna,
/obj/item/reagent_containers/vessel/beaker/large = 1,
/obj/item/stock_parts/capacitor = 1
)

/// Container storing reagents for steam
var/obj/item/reagent_containers/container

var/list/reagent_whitelist

reagent_whitelist = list(/datum/reagent/water)

var/static/image/container_overlay = image(icon = 'icons/obj/machines/sauna.dmi', icon_state = "container")
var/static/image/on_bad = image(icon = 'icons/obj/machines/sauna.dmi', icon_state = "on_bad")
var/static/image/on_good = image(icon = 'icons/obj/machines/sauna.dmi', icon_state = "on_good")
Expand Down Expand Up @@ -57,6 +60,10 @@
if(issilicon(user))
return

if(!anchored)
show_splash_text(user, "anchor it first!", "\The [src] must be anchored to the floor!")
return

var/list/options = list()

if(istype(container))
Expand Down Expand Up @@ -99,10 +106,10 @@
playsound(get_turf(src), GET_SFX(SFX_USE_KNOB), 45, TRUE)

/obj/machinery/sauna/attackby(obj/item/attack_item, mob/living/user, params)
if(!container && default_deconstruction_screwdriver(user, icon_state, icon_state, attack_item))
if(!container && default_deconstruction_screwdriver(user, attack_item))
return

if(default_deconstruction_crowbar(attack_item))
if(default_deconstruction_crowbar(user, attack_item))
return

if(istype(attack_item, /obj/item/reagent_containers/vessel) && attack_item.is_open_container())
Expand All @@ -115,6 +122,20 @@

return ..()

/obj/machinery/sauna/wrench_floor_bolts(mob/user)
if(!(stat & (NOPOWER | BROKEN | POWEROFF)))
show_splash_text(user, "turn off first!", "\The [src] must be turned off first!")
return

. = ..()
if(!.)
return

if(!anchored)
stat |= POWEROFF
STOP_PROCESSING(SSmachines, src)
update_icon()

/obj/machinery/sauna/Process()
if(stat & (NOPOWER | BROKEN | POWEROFF))
STOP_PROCESSING(SSmachines, src)
Expand Down Expand Up @@ -191,6 +212,14 @@

/// Generic toggle proc. Nothing special.
/obj/machinery/sauna/proc/toggle(mob/user)
if(stat & NOPOWER)
show_splash_text(user, "no power!", "\The [src] is not powered!")
return

if(stat & BROKEN)
show_splash_text(user, "broken!", "\The [src] is broken!")
return

if(stat & POWEROFF)
stat &= ~POWEROFF
show_splash_text(user, "enabled", "You turn on \the [src]")
Expand Down Expand Up @@ -242,14 +271,15 @@
AddOverlays(emissive)

/obj/machinery/sauna/proc/update_glow()
if(!(stat & (BROKEN | NOPOWER | POWEROFF)))
if(stat & (BROKEN | NOPOWER | POWEROFF))
set_light(0)
return FALSE

if(istype(container) && container?.reagents.get_reagent_amount(/datum/reagent/water))
set_light(0.15, 0.1, 1, 2, "#82ff4c")
set_light(0.15, 1, 2, 3.5, "#82ff4c")
else
set_light(0.15, 0.1, 1, 2, "#f86060")
set_light(0.15, 1, 2, 3.5, "#f86060")
return TRUE

/obj/machinery/sauna/examine(mob/user, infix)
. = ..()
Expand All @@ -262,6 +292,9 @@

. += SPAN_NOTICE("Its temperature is set at [CONV_KELVIN_CELSIUS(target_temperature)] celsius.")

if(panel_open)
. += SPAN_NOTICE("[src]'s maintenance hatch is open!")

/atom/movable/steam_controller
anchored = TRUE
invisibility = INVISIBILITY_SYSTEM
Expand All @@ -287,6 +320,8 @@
for(var/turf/turf in turfs)
turf.vis_contents.Remove(overlay)

QDEL_NULL(overlay)

var/obj/machinery/sauna/sauna = sauna_ref.resolve()
if(istype(sauna))
sauna.steam = null
Expand All @@ -305,11 +340,9 @@
condense(turfs)
return

if(isnull(reagents))
create_reagents(1000)

if(turfs?.len * WATER_UNIT_PER_TILE > reagents?.get_reagent_amount(/datum/reagent/water))
disappear()
return

if(turfs?.len * WATER_UNIT_PER_TILE < reagents?.get_reagent_amount(/datum/reagent/water))
reagents?.remove_reagent(/datum/reagent/water, turfs?.len * WATER_UNIT_PER_TILE)
Expand Down
7 changes: 5 additions & 2 deletions code/game/machinery/coffeemaker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
base_icon_state = "coffeemaker_impressa"
obj_flags = OBJ_FLAG_ANCHORABLE
density = TRUE

component_types = list(/obj/item/circuitboard/coffeemaker)

var/obj/item/reagent_containers/vessel/coffeepot/coffeepot = null
var/brewing = FALSE
var/brew_time = 8 SECONDS
Expand Down Expand Up @@ -191,10 +194,10 @@
return TRUE

/obj/machinery/coffeemaker/attackby(obj/item/attack_item, mob/living/user, params)
if(!coffeepot && default_deconstruction_screwdriver(user, icon_state, icon_state, attack_item))
if(!coffeepot && default_deconstruction_screwdriver(user, attack_item))
return

if(default_deconstruction_crowbar(attack_item))
if(default_deconstruction_crowbar(user, attack_item))
return

if(panel_open) //Can't insert objects when its screwed open
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/slot_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
/obj/machinery/slot_machine/proc/money_roll()
plays = TRUE
update_icon()
addtimer(CALLBACK(src, .proc/_money_roll), 3 SECONDS)
addtimer(CALLBACK(src, nameof(.proc/_money_roll)), 3 SECONDS)

/obj/machinery/slot_machine/proc/_money_roll()
var/roll = rand(1, max_roll)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/turret/_turrets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ GLOBAL_LIST_EMPTY(all_turrets)
to_chat(user, SPAN_WARNING("You short out \the [src]'s threat assessment circuits."))
visible_message("\The [src] hums oddly...")
enabled = FALSE
addtimer(CALLBACK(src, .proc/emagged_targeting), 6 SECONDS)
addtimer(CALLBACK(src, nameof(.proc/emagged_targeting)), 6 SECONDS)
state_machine.evaluate()

/obj/machinery/turret/proc/emagged_targeting()
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/effects/proximity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
SetRange(current_range,TRUE)

/datum/proximity_monitor/Destroy()
if(!isnull(host))
unregister_signal(host, SIGNAL_MOVED)
host = null
last_host_loc = null
hasprox_receiver = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/obj/item/stock_parts/micro_laser = 3,
/obj/item/stock_parts/manipulator = 1)

/obj/item/circuitboard/microwave
/obj/item/circuitboard/sauna
name = T_BOARD("sauna")
build_path = /obj/machinery/sauna
board_type = "machine"
Expand Down
16 changes: 9 additions & 7 deletions code/game/turfs/simulated/wall_icon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
var/image/I

if(!density)
I = OVERLAY(masks_icon, "[material.icon_base]fwall_open")
I.color = material.icon_colour
AddOverlays(I)
icon = masks_icon
icon_state = "[material.icon_base]fwall_open"
color = material.icon_colour
return

I = image(GLOB.bitmask_icon_sheets["wall_[material.icon_base]"], "[wall_connections]")
I.color = material.icon_colour
AddOverlays(I)
icon = GLOB.bitmask_icon_sheets["wall_[material.icon_base]"]
icon_state = "[wall_connections]"
color = material.icon_colour

if(reinf_material)
if(construction_stage != null && construction_stage < 6)
I = OVERLAY(masks_icon, "reinf_construct-[construction_stage]")
I = OVERLAY(masks_icon, "reinf_construct-[construction_stage]", appearance_flags = RESET_COLOR)
I.color = reinf_material.icon_colour
AddOverlays(I)
else
Expand All @@ -65,10 +65,12 @@
if("[reinf_material.icon_reinf]0" in mask_overlay_states[masks_icon])
I = image(GLOB.bitmask_icon_sheets["wall_[reinf_material.icon_reinf]"], "[wall_connections]")
I.color = reinf_material.icon_colour
I.appearance_flags = DEFAULT_APPEARANCE_FLAGS | RESET_COLOR
AddOverlays(I)
else
I = OVERLAY(masks_icon, reinf_material.icon_reinf)
I.color = reinf_material.icon_colour
I.appearance_flags = DEFAULT_APPEARANCE_FLAGS | RESET_COLOR
AddOverlays(I)

if(damage != 0)
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/simulated/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
opacity = 1
density = 1
blocks_air = 1
plane = TURF_PLANE
plane = DEFAULT_PLANE // TURF_PLANE is for floors, but here we need structure-like rendering.
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
hitby_sound = 'sound/effects/metalhit2.ogg'
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GLOBAL_LIST_EMPTY(clothing_blood_icons)
if(slot == slot_l_hand_str || slot == slot_r_hand_str)
return

var/image/ret = .
var/image/ret = . ? . : image('icons/effects/blank.dmi')

if(ishuman(user_mob))
var/mob/living/carbon/human/user_human = user_mob
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holodeck/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
clear_projections()

var/offline_template = SSmapping.holodeck_templates[offline_program]
INVOKE_ASYNC(CALLBACK(offline_template, nameof(/datum/map_template/proc/load), bottom_left))
INVOKE_ASYNC(CALLBACK(offline_template, nameof(/datum/map_template.proc/load), bottom_left))

/obj/machinery/computer/holodeck/Process()
if(!active)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/deity/phenomena/communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
if((M in view) && M.client)
to_chat(M, "<span class='cult'>Your attention is eerily drawn to \the [a].</span>")
M.client.images += arrow
register_signal(M, SIGNAL_LOGGED_OUT, /datum/phenomena/point/proc/remove_image)
register_signal(M, SIGNAL_LOGGED_OUT, nameof(/datum/phenomena/point.proc/remove_image))
spawn(20)
if(M.client)
remove_image(M)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/solar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ var/list/solars_list = list()

/obj/item/solar_assembly/attackby(obj/item/W, mob/user)
if(!tracker)
if(istype(W, /obj/item/tracker_electronics) && user.drop(W))
if(istype(W, /obj/item/tracker_electronics) && user.drop(W, src))
tracker = 1
user.visible_message("<span class='notice'>[user] inserts the electronics into the solar assembly.</span>")
return 1
Expand Down
Loading

0 comments on commit dc39aa9

Please sign in to comment.