Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Mosley
2025-04-24 17:03:15 -05:00
402 changed files with 2262 additions and 1524 deletions
+9 -15
View File
@@ -39,6 +39,7 @@
var/icon_icon = 'icons/mob/actions.dmi'
/// This is the icon state for the icon that appears on the button
var/button_icon_state = "default"
var/button_overlay_state
/datum/action/New(Target)
link_to(Target)
@@ -92,7 +93,7 @@
if(!hud.mymob)
continue
HideFrom(hud.mymob)
LAZYREMOVE(remove_from.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
LAZYREMOVE(remove_from?.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
viewers = list()
if(isnull(owner))
@@ -177,6 +178,11 @@
ApplyIcon(button, force)
if(button_overlay_state)
button.cut_overlay(button.button_overlay)
button.button_overlay = mutable_appearance(icon = 'icons/mob/actions.dmi', icon_state = button_overlay_state)
button.add_overlay(button.button_overlay)
if(!IsAvailable(TRUE))
button.color = transparent_when_unavailable ? rgb(128,0,0,128) : rgb(128,0,0)
else
@@ -362,6 +368,8 @@
/datum/action/item_action/set_internals
name = "Set Internals"
default_button_position = SCRN_OBJ_INSERT_FIRST
button_overlay_state = "ab_goldborder"
/datum/action/item_action/set_internals/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force)
if(!..()) // no button available
@@ -941,20 +949,6 @@
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "jetboot"
/datum/action/language_menu
name = "Language Menu"
desc = "Open the language menu to review your languages, their keys, and select your default language."
button_icon_state = "language_menu"
check_flags = 0
/datum/action/language_menu/Trigger()
if(!..())
return FALSE
if(ismob(owner))
var/mob/M = owner
var/datum/language_holder/H = M.get_language_holder()
H.open_language_menu(usr)
/datum/action/item_action/wheelys
name = "Toggle Wheely-Heel's Wheels"
desc = "Pops out or in your wheely-heel's wheels."
+4 -4
View File
@@ -28,13 +28,13 @@
lose_text = "<span class='notice'>You suddenly remember how languages work.</span>"
/datum/brain_trauma/severe/aphasia/on_gain()
owner.add_blocked_language(subtypesof(/datum/language/) - /datum/language/aphasia, LANGUAGE_APHASIA)
owner.grant_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
owner.add_blocked_language(subtypesof(/datum/language) - /datum/language/aphasia, LANGUAGE_APHASIA)
owner.grant_language(/datum/language/aphasia, source = LANGUAGE_APHASIA)
..()
/datum/brain_trauma/severe/aphasia/on_lose()
owner.remove_blocked_language(subtypesof(/datum/language/), LANGUAGE_APHASIA)
owner.remove_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
owner.remove_blocked_language(subtypesof(/datum/language), LANGUAGE_APHASIA)
owner.remove_language(/datum/language/aphasia, LANGUAGE_APHASIA)
..()
/datum/brain_trauma/severe/blindness
+2 -2
View File
@@ -40,8 +40,7 @@
/// Creates the hud screen object.
/datum/component/combat_mode/proc/on_mob_hud_created(mob/source)
hud_icon = new
hud_icon.hud = source.hud_used
hud_icon = new(null, source.hud_used)
hud_icon.icon = tg_ui_icon_to_cit_ui(source.hud_used.ui_style)
hud_icon.screen_loc = hud_loc
source.hud_used.static_inventory += hud_icon
@@ -187,6 +186,7 @@
name = "toggle combat mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "combat_off"
mouse_over_pointer = MOUSE_HAND_POINTER
var/mutable_appearance/flashy
var/combat_on = FALSE ///Wheter combat mode is enabled or not, so we don't have to store a reference.
+2 -2
View File
@@ -4,11 +4,11 @@
/datum/component/personal_crafting/proc/create_mob_button(mob/user)
var/datum/hud/H = user.hud_used
var/atom/movable/screen/craft/C = new()
var/atom/movable/screen/craft/C = new(null, H)
C.icon = H.ui_style
H.static_inventory += C
user.client.screen += C
RegisterSignal(C, COMSIG_CLICK, PROC_REF(component_ui_interact))
RegisterSignal(C, COMSIG_SCREEN_ELEMENT_CLICK, PROC_REF(component_ui_interact))
/datum/component/personal_crafting
var/busy
+3 -3
View File
@@ -300,12 +300,12 @@
/datum/component/mood/proc/modify_hud(datum/source)
var/mob/living/owner = parent
var/datum/hud/hud = owner.hud_used
screen_obj = new
screen_obj_sanity = new // Sandstorm sanity
screen_obj = new(null, hud)
screen_obj_sanity = new(null, hud)
hud.infodisplay += screen_obj
hud.infodisplay += screen_obj_sanity // Sandstorm sanity
RegisterSignal(hud, COMSIG_PARENT_QDELETING, PROC_REF(unmodify_hud))
RegisterSignal(screen_obj, COMSIG_CLICK, PROC_REF(hud_click))
RegisterSignal(screen_obj, COMSIG_SCREEN_ELEMENT_CLICK, PROC_REF(hud_click))
/datum/component/mood/proc/unmodify_hud(datum/source)
if(!screen_obj || !parent)
+1 -1
View File
@@ -13,7 +13,7 @@
var/rotation_flags = NONE
var/default_rotation_direction = ROTATION_CLOCKWISE
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
/datum/component/simple_rotation/Initialize(rotation_flags = NONE, can_user_rotate, can_be_rotated, after_rotation)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
+15 -15
View File
@@ -33,11 +33,11 @@
var/rows = clamp(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
// First, boxes.
ui_boxes = get_ui_boxes()
ui_boxes = get_ui_boxes(user.hud_used)
ui_boxes.screen_loc = "[screen_start_x]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x+columns-1]:[screen_pixel_x],[screen_start_y+rows-1]:[screen_pixel_y]"
. += ui_boxes
// Then, closer.
ui_close = get_ui_close()
ui_close = get_ui_close(user.hud_used)
ui_close.screen_loc = "[screen_start_x + columns]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y]"
. += ui_close
// Then orient the actual items.
@@ -62,7 +62,7 @@
for(var/obj/O in accessible_items())
if(QDELETED(O))
continue
var/atom/movable/screen/storage/item_holder/D = new(null, src, O)
var/atom/movable/screen/storage/item_holder/D = new(null, user.hud_used, src, O)
// SNOWFLAKE: make O opaque too, pending storage rewrite
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
D.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
@@ -139,7 +139,7 @@
for(var/i in percentage_by_item)
I = i
var/percent = percentage_by_item[I]
var/atom/movable/screen/storage/volumetric_box/center/B = new /atom/movable/screen/storage/volumetric_box/center(null, src, I)
var/atom/movable/screen/storage/volumetric_box/center/B = new /atom/movable/screen/storage/volumetric_box/center(null, user.hud_used, src, I)
// SNOWFLAKE: force it to icon until we unfuck storage/click passing
I.mouse_opacity = MOUSE_OPACITY_ICON
var/pixels_to_use = overrun? MINIMUM_PIXELS_PER_ITEM : max(using_horizontal_pixels * percent, MINIMUM_PIXELS_PER_ITEM)
@@ -168,15 +168,15 @@
current_pixel = VOLUMETRIC_STORAGE_EDGE_PADDING
// Then, continuous section.
ui_continuous = get_ui_continuous()
ui_continuous = get_ui_continuous(user.hud_used)
ui_continuous.screen_loc = "[screen_start_x]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x+maxcolumns-1]:[screen_pixel_x],[screen_start_y+rows-1]:[screen_pixel_y]"
. += ui_continuous
// Then, left.
ui_left = get_ui_left()
ui_left = get_ui_left(user.hud_used)
ui_left.screen_loc = "[screen_start_x]:[screen_pixel_x - 2],[screen_start_y]:[screen_pixel_y] to [screen_start_x]:[screen_pixel_x - 2],[screen_start_y+rows-1]:[screen_pixel_y]"
. += ui_left
// Then, closer, which is also our right element.
ui_close = get_ui_close()
ui_close = get_ui_close(user.hud_used)
ui_close.screen_loc = "[screen_start_x + maxcolumns]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x + maxcolumns]:[screen_pixel_x],[screen_start_y+rows-1]:[screen_pixel_y]"
. += ui_close
@@ -258,23 +258,23 @@
/**
* Gets our ui_boxes, making it if it doesn't exist.
*/
/datum/component/storage/proc/get_ui_boxes()
return new /atom/movable/screen/storage/boxes(null, src)
/datum/component/storage/proc/get_ui_boxes(datum/hud/hud)
return new /atom/movable/screen/storage/boxes(null, hud, src)
/**
* Gets our ui_left, making it if it doesn't exist.
*/
/datum/component/storage/proc/get_ui_left()
return new /atom/movable/screen/storage/left(null, src)
/datum/component/storage/proc/get_ui_left(datum/hud/hud)
return new /atom/movable/screen/storage/left(null, hud, src)
/**
* Gets our ui_close, making it if it doesn't exist.
*/
/datum/component/storage/proc/get_ui_close()
return new /atom/movable/screen/storage/close(null, src)
/datum/component/storage/proc/get_ui_close(datum/hud/hud)
return new /atom/movable/screen/storage/close(null, hud, src)
/**
* Gets our ui_continuous, making it if it doesn't exist.
*/
/datum/component/storage/proc/get_ui_continuous()
return new /atom/movable/screen/storage/continuous(null, src)
/datum/component/storage/proc/get_ui_continuous(datum/hud/hud)
return new /atom/movable/screen/storage/continuous(null, hud, src)
@@ -63,7 +63,7 @@ Bonus
if(scramble_language && !current_language) // Last part prevents rerolling language with small amounts of cure.
current_language = pick(subtypesof(/datum/language) - /datum/language/common)
H.add_blocked_language(subtypesof(/datum/language) - current_language, LANGUAGE_VOICECHANGE)
H.grant_language(current_language, TRUE, TRUE, LANGUAGE_VOICECHANGE)
H.grant_language(current_language, source = LANGUAGE_VOICECHANGE)
/datum/symptom/voice_change/End(datum/disease/advance/A)
..()
-1
View File
@@ -407,7 +407,6 @@
qdel(language_holder)
var/species_holder = initial(mrace.species_language_holder)
language_holder = new species_holder(src)
update_atom_languages()
/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE)
..()
+64 -49
View File
@@ -4,75 +4,90 @@
var/cleanable
var/description
var/mutable_appearance/pic
var/list/num_decals_per_atom
/**
* A short lecture on decal element collision on rotation
* If a given decal's rotated version is identical to one of existing (at a same target), pre-rotation decals,
* then the rotated decal won't stay after when the colliding pre-rotation decal gets rotated,
* resulting in some decal elements colliding into nonexistence. This internal tick-tock prevents
* such collision by forcing a non-collision.
*/
var/rotated
var/first_dir // This stores the direction of the decal compared to the parent facing NORTH
/datum/element/decal/Attach(datum/target, _icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description, _alpha=255)
/datum/element/decal/Attach(atom/target, _icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description, _alpha=255, _rotated=FALSE)
. = ..()
if(. == ELEMENT_INCOMPATIBLE || !_icon || !_icon_state || !isatom(target))
if(!isatom(target) || (pic ? FALSE : !generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha, target)))
return ELEMENT_INCOMPATIBLE
var/atom/A = target
if(!pic)
// It has to be made from an image or dir breaks because of a byond bug
var/temp_image = image(_icon, null, _icon_state, _layer, _dir)
pic = new(temp_image)
pic.color = _color
pic.alpha = _alpha
first_dir = _dir
description = _description
cleanable = _cleanable
rotated = _rotated
LAZYINITLIST(num_decals_per_atom)
if(!num_decals_per_atom[A])
if(first_dir)
RegisterSignal(A, COMSIG_ATOM_DIR_CHANGE, PROC_REF(rotate_react))
if(cleanable)
RegisterSignal(A, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_react))
if(description)
RegisterSignal(A, COMSIG_PARENT_EXAMINE, PROC_REF(examine))
RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(apply_overlay), TRUE)
num_decals_per_atom[A]++
apply(A)
/datum/element/decal/Detach(datum/target)
var/atom/A = target
num_decals_per_atom[A]--
if(!num_decals_per_atom[A])
UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE,
COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
LAZYREMOVE(num_decals_per_atom, A)
apply(A)
return ..()
/datum/element/decal/proc/apply(atom/target)
RegisterSignal(target,COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(apply_overlay), TRUE)
if(isturf(target))
RegisterSignal(target,COMSIG_TURF_AFTER_SHUTTLE_MOVE, PROC_REF(shuttlemove_react), TRUE)
if(target.flags_1 & INITIALIZED_1)
target.update_icon() //could use some queuing here now maybe.
else if(!QDELETED(target) && num_decals_per_atom[target] == 1)
RegisterSignal(target, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE, PROC_REF(late_update_icon))
else
RegisterSignal(target,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE,PROC_REF(late_update_icon), TRUE)
if(isitem(target))
addtimer(CALLBACK(target, TYPE_PROC_REF(/obj/item, update_slot_icon)), 0, TIMER_UNIQUE)
INVOKE_ASYNC(target, TYPE_PROC_REF(/obj/item, update_slot_icon), TRUE)
if(_dir)
RegisterSignal(target, COMSIG_ATOM_DIR_CHANGE, PROC_REF(rotate_react),TRUE)
if(_cleanable)
RegisterSignal(target, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_react),TRUE)
if(_description)
RegisterSignal(target, COMSIG_PARENT_EXAMINE, PROC_REF(examine),TRUE)
/datum/element/decal/proc/generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha, source)
if(!_icon || !_icon_state)
return FALSE
var/temp_image = image(_icon, null, _icon_state, _layer, _dir)
pic = new(temp_image)
pic.color = _color
pic.alpha = _alpha
return TRUE
/datum/element/decal/Detach(atom/source, force)
UnregisterSignal(source, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS,COMSIG_TURF_AFTER_SHUTTLE_MOVE))
source.update_icon()
if(isitem(source))
INVOKE_ASYNC(source, TYPE_PROC_REF(/obj/item, update_slot_icon))
return ..()
/datum/element/decal/proc/late_update_icon(atom/source)
source.update_icon()
UnregisterSignal(source,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
SIGNAL_HANDLER
if(source && istype(source))
source.update_icon()
UnregisterSignal(source,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
/datum/element/decal/proc/apply_overlay(atom/source, list/overlay_list)
if(first_dir)
pic.dir = first_dir == SOUTH ? source.dir : turn(first_dir, dir2angle(source.dir)-180) //Never turn a dir by 0.
for(var/i in 1 to num_decals_per_atom[source])
overlay_list += pic
SIGNAL_HANDLER
overlay_list += pic
/datum/element/decal/proc/shuttlemove_react(datum/source, turf/newT)
SIGNAL_HANDLER
Detach(source)
newT.AddElement(/datum/element/decal, pic.icon, pic.icon_state, pic.dir, cleanable, pic.color, pic.layer, description, pic.alpha, rotated)
/datum/element/decal/proc/rotate_react(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
/datum/element/decal/proc/rotate_react(atom/source, old_dir, new_dir)
if(old_dir == new_dir)
return
source.update_icon()
Detach(source)
source.AddElement(/datum/element/decal, pic.icon, pic.icon_state, angle2dir(dir2angle(pic.dir)+dir2angle(new_dir)-dir2angle(old_dir)), cleanable, pic.color, pic.layer, description, pic.alpha, !rotated)
/datum/element/decal/proc/clean_react(datum/source, strength)
SIGNAL_HANDLER
if(strength >= cleanable)
Detach(source)
return TRUE
return NONE
/datum/element/decal/proc/examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER
examine_list += description
+13 -10
View File
@@ -64,7 +64,6 @@
var/isholy = FALSE //is this person a chaplain or admin role allowed to use bibles
var/mob/living/enslaved_to //If this mind's master is another mob (i.e. adamantine golems)
var/datum/language_holder/language_holder
var/unconvertable = FALSE
var/late_joiner = FALSE
///has this mind ever been an AI
@@ -97,7 +96,6 @@
/datum/mind/Destroy()
SSticker.minds -= src
QDEL_LIST(antag_datums)
QDEL_NULL(language_holder)
QDEL_NULL(skill_holder)
set_current(null)
soulOwner = null
@@ -119,12 +117,6 @@
/datum/mind/proc/set_original_character(new_original_character)
original_character = WEAKREF(new_original_character)
/datum/mind/proc/get_language_holder()
if(!language_holder)
language_holder = new (src)
return language_holder
/datum/mind/proc/transfer_to(mob/new_character, var/force_key_move = 0)
var/old_character = current
var/signals = SEND_SIGNAL(new_character, COMSIG_MOB_PRE_PLAYER_CHANGE, new_character, old_character) | SEND_SIGNAL(src, COMSIG_PRE_MIND_TRANSFER, new_character, old_character)
@@ -146,7 +138,19 @@
var/datum/atom_hud/antag/hud_to_transfer = antag_hud//we need this because leave_hud() will clear this list
var/mob/living/old_current = current
if(current)
current.transfer_observers_to(new_character) //transfer anyone observing the old character to the new one
//transfer anyone observing the old character to the new one
current.transfer_observers_to(new_character)
// Offload all mind languages from the old holder to a temp one
var/datum/language_holder/empty/temp_holder = new()
var/datum/language_holder/old_holder = old_current.get_language_holder()
var/datum/language_holder/new_holder = new_character.get_language_holder()
// Off load mind languages to the temp holder momentarily
new_holder.transfer_mind_languages(temp_holder)
// Transfer the old holder's mind languages to the new holder
old_holder.transfer_mind_languages(new_holder)
// And finally transfer the temp holder's mind languages back to the old holder
temp_holder.transfer_mind_languages(old_holder)
set_current(new_character) //associate ourself with our new body
new_character.mind = src //and associate our new body with ourself
for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body
@@ -163,7 +167,6 @@
if(new_character.client)
LAZYCLEARLIST(new_character.client.recent_examines)
new_character.client.init_verbs() // re-initialize character specific verbs
current.update_atom_languages()
//CIT CHANGE - makes arousal update when transfering bodies
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
+2 -2
View File
@@ -277,10 +277,10 @@
/datum/mutation/human/stoner/on_acquiring(mob/living/carbon/human/owner)
..()
owner.grant_language(/datum/language/beachbum, TRUE, TRUE, LANGUAGE_STONER)
owner.grant_language(/datum/language/beachbum, source = LANGUAGE_STONER)
owner.add_blocked_language(subtypesof(/datum/language) - /datum/language/beachbum, LANGUAGE_STONER)
/datum/mutation/human/stoner/on_losing(mob/living/carbon/human/owner)
..()
owner.remove_language(/datum/language/beachbum, TRUE, TRUE, LANGUAGE_STONER)
owner.remove_language(/datum/language/beachbum, source = LANGUAGE_STONER)
owner.remove_blocked_language(subtypesof(/datum/language) - /datum/language/beachbum, LANGUAGE_STONER)
+1 -1
View File
@@ -6,5 +6,5 @@
/datum/numbered_display/New(obj/item/sample, _number = 1, datum/component/storage/parent)
if(!istype(sample))
qdel(src)
sample_object = new /atom/movable/screen/storage/item_holder(null, parent, sample)
sample_object = new /atom/movable/screen/storage/item_holder(null, null, parent, sample)
number = _number
+59 -5
View File
@@ -1,3 +1,6 @@
/// Station traits displayed in the lobby
GLOBAL_LIST_EMPTY(lobby_station_traits)
///Base class of station traits. These are used to influence rounds in one way or the other by influencing the levers of the station.
/datum/station_trait
///Name of the trait
@@ -22,26 +25,30 @@
var/trait_flags
/// Whether or not this trait can be reverted by an admin
var/can_revert = TRUE
/// If set to true we'll show a button on the lobby to notify people about this trait
var/sign_up_button = FALSE
/// Lobby buttons controlled by this trait
var/list/lobby_buttons = list()
/datum/station_trait/New()
. = ..()
RegisterSignal(SSticker, COMSIG_TICKER_ROUND_STARTING, PROC_REF(on_round_start))
if(sign_up_button)
GLOB.lobby_station_traits += src
if(SSstation.initialized)
SSstation.display_lobby_traits()
if(trait_processes)
START_PROCESSING(SSstation, src)
if(trait_to_give)
ADD_TRAIT(SSstation, trait_to_give, STATION_TRAIT)
/datum/station_trait/Destroy()
destroy_lobby_buttons()
SSstation.station_traits -= src
return ..()
/// Proc ran when round starts. Use this for roundstart effects.
/datum/station_trait/proc/on_round_start()
SIGNAL_HANDLER
return
///type of info the centcom report has on this trait, if any.
/datum/station_trait/proc/get_report()
return "[name] - [report_message]"
@@ -55,3 +62,50 @@
REMOVE_TRAIT(SSstation, trait_to_give, STATION_TRAIT)
qdel(src)
/// Return TRUE if we want to show a lobby button, by default we assume we don't want it after the round begins
/datum/station_trait/proc/can_display_lobby_button(client/player)
return sign_up_button && !SSticker.HasRoundStarted()
/// Apply any additional handling we need to our lobby button
/datum/station_trait/proc/setup_lobby_button(atom/movable/screen/lobby/button/sign_up/lobby_button)
SHOULD_CALL_PARENT(TRUE)
lobby_button.name = name
lobby_buttons |= lobby_button
RegisterSignal(lobby_button, COMSIG_ATOM_UPDATE_ICON, PROC_REF(on_lobby_button_update_icon))
RegisterSignal(lobby_button, COMSIG_SCREEN_ELEMENT_CLICK, PROC_REF(on_lobby_button_click))
RegisterSignal(lobby_button, COMSIG_PARENT_QDELETING, PROC_REF(on_lobby_button_destroyed))
lobby_button.update_appearance(UPDATE_ICON)
/// Called when our lobby button is clicked on
/datum/station_trait/proc/on_lobby_button_click(atom/movable/screen/lobby/button/sign_up/lobby_button, location, control, params, mob/dead/new_player/user)
SIGNAL_HANDLER
return
/// Called when our lobby button tries to update its appearance
/datum/station_trait/proc/on_lobby_button_update_icon(atom/movable/screen/lobby/button/sign_up/lobby_button, updates)
SIGNAL_HANDLER
return
/// Don't hold references to deleted buttons
/datum/station_trait/proc/on_lobby_button_destroyed(atom/movable/screen/lobby/button/sign_up/lobby_button)
SIGNAL_HANDLER
lobby_buttons -= lobby_button
/// Proc ran when round starts. Use this for roundstart effects. By default we clean up our buttons here.
/datum/station_trait/proc/on_round_start()
SIGNAL_HANDLER
destroy_lobby_buttons()
/// Remove all of our active lobby buttons
/datum/station_trait/proc/destroy_lobby_buttons()
for (var/atom/movable/screen/button as anything in lobby_buttons)
var/mob/dead/new_player/hud_owner = button.get_mob()
if (QDELETED(hud_owner))
qdel(button)
continue
var/datum/hud/new_player/using_hud = hud_owner.hud_used
if(!using_hud)
qdel(button)
continue
using_hud.remove_station_trait_button(src)
@@ -152,9 +152,7 @@
. = ..()
//All bots that exist round start have their set language randomized.
for(var/mob/living/simple_animal/bot/found_bot in GLOB.alive_mob_list)
/// The bot's language holder - so we can randomize and change their language
var/datum/language_holder/bot_languages = found_bot.get_language_holder()
bot_languages.selected_language = bot_languages.get_random_spoken_language()
found_bot.set_active_language(found_bot.get_random_spoken_language())
/datum/station_trait/revenge_of_pun_pun
name = "Revenge of Pun Pun"
+9 -6
View File
@@ -988,17 +988,20 @@
desc = "A magical strand of Durathread is wrapped around your neck, preventing you from breathing! Click this icon to remove the strand."
icon_state = "his_grace"
alerttooltipstyle = "hisgrace"
clickable_glow = TRUE
/atom/movable/screen/alert/status_effect/strandling/Click(location, control, params)
. = ..()
if(usr != owner)
if(!.)
return
to_chat(owner, "<span class='notice'>You attempt to remove the durathread strand from around your neck.</span>")
if(do_after(owner, 3.5 SECONDS, owner))
if(isliving(owner))
var/mob/living/L = owner
to_chat(owner, "<span class='notice'>You successfully remove the durathread strand.</span>")
L.remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
if(!do_after(owner, 3.5 SECONDS, owner))
return
if(!isliving(owner))
return
var/mob/living/L = owner
to_chat(owner, "<span class='notice'>You successfully remove the durathread strand.</span>")
L.remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
/datum/status_effect/pacify
@@ -102,8 +102,12 @@
/atom/movable/screen/alert/status_effect/wound
name = "Wounded"
desc = "Your body has sustained serious damage, click here to inspect yourself."
clickable_glow = TRUE
/atom/movable/screen/alert/status_effect/wound/Click()
. = ..()
if(!.)
return
var/mob/living/carbon/C = usr
C.check_self_for_injuries()
@@ -58,10 +58,6 @@ GLOBAL_LIST_EMPTY(ash_storm_sounds)
GLOB.ash_storm_sounds += weak_sounds
return ..()
/datum/weather/ash_storm/end()
GLOB.ash_storm_sounds -= weak_sounds
return ..()
/datum/weather/ash_storm/proc/is_ash_immune(atom/L)
while (L && !isturf(L))
if(ismecha(L)) //Mechs are immune
@@ -88,6 +84,14 @@ GLOBAL_LIST_EMPTY(ash_storm_sounds)
return
L.adjustFireLoss(4)
/datum/weather/ash_storm/end()
GLOB.ash_storm_sounds -= weak_sounds
for(var/turf/open/floor/plating/asteroid/basalt/basalt as anything in GLOB.dug_up_basalt)
if(!(basalt.loc in impacted_areas) || !(basalt.z in impacted_z_levels))
continue
basalt.refill_dug()
return ..()
//Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm.
/datum/weather/ash_storm/emberfall
name = "emberfall"
+1 -1
View File
@@ -124,7 +124,7 @@
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == expected_key)
if(O.client?.address == addr)
new /atom/movable/screen/splash(O.client, TRUE)
new /atom/movable/screen/splash(null, O.client, TRUE)
break
/datum/world_topic/adminmsg