mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
[MIRROR] Xenoarch adjustments (#11011)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
366b18d44b
commit
05d03bf5ae
@@ -28,6 +28,16 @@
|
|||||||
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
|
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/// Though not the maximum renderable ByondUis within tgui, this is the maximum that the server will manage per-UI
|
||||||
|
#define TGUI_MANAGED_BYONDUI_LIMIT 10
|
||||||
|
|
||||||
|
// These are defines instead of being inline, as they're being sent over
|
||||||
|
// from tgui-core, so can't be easily played with
|
||||||
|
#define TGUI_MANAGED_BYONDUI_TYPE_RENDER "renderByondUi"
|
||||||
|
#define TGUI_MANAGED_BYONDUI_TYPE_UNMOUNT "unmountByondUi"
|
||||||
|
|
||||||
|
#define TGUI_MANAGED_BYONDUI_PAYLOAD_ID "renderByondUi"
|
||||||
|
|
||||||
/// Max length for Modal Input
|
/// Max length for Modal Input
|
||||||
#define TGUI_MODAL_INPUT_MAX_LENGTH 1024
|
#define TGUI_MODAL_INPUT_MAX_LENGTH 1024
|
||||||
/// Max length for Modal Input for names
|
/// Max length for Modal Input for names
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
if(prob(prob))
|
if(prob(prob))
|
||||||
M.dna.SetSEValue(i,rand(1,4095),1)
|
M.dna.SetSEValue(i,rand(1,4095),1)
|
||||||
M.dna.UpdateSE()
|
M.dna.UpdateSE()
|
||||||
domutcheck(M, null)
|
domutcheck(M, null, MUTCHK_FORCED|MUTCHK_HIDEMSG)
|
||||||
M.UpdateAppearance()
|
M.UpdateAppearance()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
pref.real_name = random_name(pref.identifying_gender, pref.species)
|
pref.real_name = random_name(pref.identifying_gender, pref.species)
|
||||||
pref.nickname = sanitize_name(pref.nickname)
|
pref.nickname = sanitize_name(pref.nickname)
|
||||||
pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, GLOB.global_vore_egg_types, initial(pref.vore_egg_type))
|
pref.vore_egg_type = sanitize_inlist(pref.vore_egg_type, GLOB.global_vore_egg_types, initial(pref.vore_egg_type))
|
||||||
pref.autohiss = sanitize_inlist(pref.autohiss, list("None", "Basic", "Full"), initial(pref.autohiss))
|
pref.autohiss = sanitize_inlist(pref.autohiss, list("Off", "Basic", "Full"), initial(pref.autohiss))
|
||||||
|
|
||||||
// Moved from /datum/preferences/proc/copy_to()
|
// Moved from /datum/preferences/proc/copy_to()
|
||||||
/datum/category_item/player_setup_item/general/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
/datum/category_item/player_setup_item/general/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
var/datum/tgui_state/state = null
|
var/datum/tgui_state/state = null
|
||||||
/// Rate limit client refreshes to prevent DoS.
|
/// Rate limit client refreshes to prevent DoS.
|
||||||
COOLDOWN_DECLARE(refresh_cooldown)
|
COOLDOWN_DECLARE(refresh_cooldown)
|
||||||
/// Are byond mouse events beyond the window passed in to the ui
|
/// The id of any ByondUi elements that we have opened
|
||||||
var/mouse_hooked = FALSE
|
var/list/open_byondui_elements
|
||||||
/// The map z-level to display.
|
/// The map z-level to display.
|
||||||
var/map_z_level = 1
|
var/map_z_level = 1
|
||||||
/// The Parent UI
|
/// The Parent UI
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
/// If the window should be closed with other windows when requested
|
/// If the window should be closed with other windows when requested
|
||||||
var/closeable = TRUE
|
var/closeable = TRUE
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public
|
* public
|
||||||
*
|
*
|
||||||
@@ -128,8 +129,6 @@
|
|||||||
window.send_message("update", get_payload(
|
window.send_message("update", get_payload(
|
||||||
with_data = TRUE,
|
with_data = TRUE,
|
||||||
with_static_data = TRUE))
|
with_static_data = TRUE))
|
||||||
if(mouse_hooked)
|
|
||||||
window.set_mouse_macro()
|
|
||||||
SStgui.on_open(src)
|
SStgui.on_open(src)
|
||||||
|
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -172,12 +171,29 @@
|
|||||||
window.close(can_be_suspended, logout)
|
window.close(can_be_suspended, logout)
|
||||||
src_object.tgui_close(user)
|
src_object.tgui_close(user)
|
||||||
SStgui.on_close(src)
|
SStgui.on_close(src)
|
||||||
|
|
||||||
|
if(user.client)
|
||||||
|
terminate_byondui_elements()
|
||||||
|
|
||||||
state = null
|
state = null
|
||||||
if(parent_ui)
|
if(parent_ui)
|
||||||
parent_ui.children -= src
|
parent_ui.children -= src
|
||||||
parent_ui = null
|
parent_ui = null
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* public
|
||||||
|
*
|
||||||
|
* Closes all ByondUI elements, left dangling by a forceful TGUI exit,
|
||||||
|
* such as via Alt+F4, closing in non-fancy mode, or terminating the process
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/datum/tgui/proc/terminate_byondui_elements()
|
||||||
|
set waitfor = FALSE
|
||||||
|
|
||||||
|
for(var/byondui_element in open_byondui_elements)
|
||||||
|
winset(user.client, byondui_element, list("parent" = ""))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public
|
* public
|
||||||
*
|
*
|
||||||
@@ -188,17 +204,6 @@
|
|||||||
/datum/tgui/proc/set_autoupdate(autoupdate)
|
/datum/tgui/proc/set_autoupdate(autoupdate)
|
||||||
src.autoupdate = autoupdate
|
src.autoupdate = autoupdate
|
||||||
|
|
||||||
/**
|
|
||||||
* public
|
|
||||||
*
|
|
||||||
* Enable/disable passing through byond mouse events to the window
|
|
||||||
*
|
|
||||||
* required value bool Enable/disable hooking.
|
|
||||||
*/
|
|
||||||
/datum/tgui/proc/set_mouse_hook(value)
|
|
||||||
src.mouse_hooked = value
|
|
||||||
//Handle unhooking/hooking on already open windows ?
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public
|
* public
|
||||||
*
|
*
|
||||||
@@ -426,6 +431,18 @@
|
|||||||
log_tgui(user, "Fallback Triggered: [href_list["payload"]], Window: [window.id], Source: [src_object]")
|
log_tgui(user, "Fallback Triggered: [href_list["payload"]], Window: [window.id], Source: [src_object]")
|
||||||
#endif
|
#endif
|
||||||
src_object.tgui_fallback(payload)
|
src_object.tgui_fallback(payload)
|
||||||
|
if(TGUI_MANAGED_BYONDUI_TYPE_RENDER)
|
||||||
|
var/byond_ui_id = payload[TGUI_MANAGED_BYONDUI_PAYLOAD_ID]
|
||||||
|
if(!byond_ui_id || LAZYLEN(open_byondui_elements) > TGUI_MANAGED_BYONDUI_LIMIT)
|
||||||
|
return
|
||||||
|
|
||||||
|
LAZYOR(open_byondui_elements, byond_ui_id)
|
||||||
|
if(TGUI_MANAGED_BYONDUI_TYPE_UNMOUNT)
|
||||||
|
var/byond_ui_id = payload[TGUI_MANAGED_BYONDUI_PAYLOAD_ID]
|
||||||
|
if(!byond_ui_id)
|
||||||
|
return
|
||||||
|
|
||||||
|
LAZYREMOVE(open_byondui_elements, byond_ui_id)
|
||||||
|
|
||||||
/// Wrapper for behavior to potentially wait until the next tick if the server is overloaded
|
/// Wrapper for behavior to potentially wait until the next tick if the server is overloaded
|
||||||
/datum/tgui/proc/on_act_message(act_type, payload, state)
|
/datum/tgui/proc/on_act_message(act_type, payload, state)
|
||||||
|
|||||||
@@ -27,19 +27,6 @@
|
|||||||
var/initial_inline_css
|
var/initial_inline_css
|
||||||
|
|
||||||
var/list/oversized_payloads = list()
|
var/list/oversized_payloads = list()
|
||||||
var/mouse_event_macro_set = FALSE
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static list used to map in macros that will then emit execute events to the tgui window
|
|
||||||
* A small disclaimer though I'm no tech wiz: I don't think it's possible to map in right or middle
|
|
||||||
* clicks in the current state, as they're keywords rather than modifiers.
|
|
||||||
*/
|
|
||||||
var/static/list/byondToTguiEventMap = list(
|
|
||||||
"MouseDown" = "byond/mousedown",
|
|
||||||
"MouseUp" = "byond/mouseup",
|
|
||||||
"Ctrl" = "byond/ctrldown",
|
|
||||||
"Ctrl+UP" = "byond/ctrlup",
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public
|
* public
|
||||||
@@ -235,8 +222,6 @@
|
|||||||
/datum/tgui_window/proc/close(can_be_suspended = TRUE)
|
/datum/tgui_window/proc/close(can_be_suspended = TRUE)
|
||||||
if(!client)
|
if(!client)
|
||||||
return
|
return
|
||||||
if(mouse_event_macro_set)
|
|
||||||
remove_mouse_macro()
|
|
||||||
if(can_be_suspended && can_be_suspended())
|
if(can_be_suspended && can_be_suspended())
|
||||||
#ifdef TGUI_DEBUGGING
|
#ifdef TGUI_DEBUGGING
|
||||||
log_tgui(client, "[id]/close: suspending")
|
log_tgui(client, "[id]/close: suspending")
|
||||||
@@ -441,32 +426,3 @@
|
|||||||
|
|
||||||
/datum/tgui_window/proc/remove_oversized_payload(payload_id)
|
/datum/tgui_window/proc/remove_oversized_payload(payload_id)
|
||||||
oversized_payloads -= payload_id
|
oversized_payloads -= payload_id
|
||||||
|
|
||||||
|
|
||||||
/datum/tgui_window/proc/set_mouse_macro()
|
|
||||||
if(mouse_event_macro_set)
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/mouseMacro in byondToTguiEventMap)
|
|
||||||
var/command_template = ".output CONTROL PAYLOAD"
|
|
||||||
var/event_message = TGUI_CREATE_MESSAGE(byondToTguiEventMap[mouseMacro], null)
|
|
||||||
var target_control = is_browser \
|
|
||||||
? "[id]:update" \
|
|
||||||
: "[id].browser:update"
|
|
||||||
var/with_id = replacetext(command_template, "CONTROL", target_control)
|
|
||||||
var/full_command = replacetext(with_id, "PAYLOAD", event_message)
|
|
||||||
|
|
||||||
var/list/params = list()
|
|
||||||
params["parent"] = "default" //Technically this is external to tgui but whatever
|
|
||||||
params["name"] = mouseMacro
|
|
||||||
params["command"] = full_command
|
|
||||||
|
|
||||||
winset(client, "[mouseMacro]Window[id]Macro", params)
|
|
||||||
mouse_event_macro_set = TRUE
|
|
||||||
|
|
||||||
/datum/tgui_window/proc/remove_mouse_macro()
|
|
||||||
if(!mouse_event_macro_set)
|
|
||||||
stack_trace("Unsetting mouse macro on tgui window that has none")
|
|
||||||
for(var/mouseMacro in byondToTguiEventMap)
|
|
||||||
winset(client, null, "[mouseMacro]Window[id]Macro.parent=null")
|
|
||||||
mouse_event_macro_set = FALSE
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
// The last time the effect was toggled.
|
// The last time the effect was toggled.
|
||||||
var/last_activation = 0
|
var/last_activation = 0
|
||||||
// If we can start activated or not!
|
// If we can start activated or not! Note: This is only really disabled on artifacts that can REALLY do some MAJOR DAMAGE to the server itself. See: Atmos & temperature artifacts destroying an entire Z-level's atmos.
|
||||||
var/can_start_activated = TRUE
|
var/can_start_activated = TRUE
|
||||||
|
|
||||||
/datum/artifact_effect/Destroy()
|
/datum/artifact_effect/Destroy()
|
||||||
@@ -51,19 +51,28 @@
|
|||||||
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
|
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
|
||||||
|
|
||||||
//random charge time and distance
|
//random charge time and distance
|
||||||
switch(pick(100;1, 50;2, 25;3))
|
switch(effect)
|
||||||
if(1)
|
if(EFFECT_PULSE)
|
||||||
//short range, short charge time
|
switch(pick(100;1, 50;2, 25;3))
|
||||||
chargelevelmax = rand(3, 20)
|
if(1)
|
||||||
effectrange = rand(1, 3)
|
//short range, short charge time
|
||||||
if(2)
|
chargelevelmax = rand(3, 20)
|
||||||
//medium range, medium charge time
|
effectrange = rand(1, 3)
|
||||||
chargelevelmax = rand(15, 40)
|
if(2)
|
||||||
effectrange = rand(5, 15)
|
//medium range, medium charge time
|
||||||
if(3)
|
chargelevelmax = rand(15, 40)
|
||||||
//large range, long charge time
|
effectrange = rand(5, 15)
|
||||||
chargelevelmax = rand(20, 120)
|
if(3)
|
||||||
effectrange = rand(20, 100)
|
//large range, long charge time
|
||||||
|
chargelevelmax = rand(20, 120)
|
||||||
|
effectrange = rand(20, 100)
|
||||||
|
if(EFFECT_AURA)
|
||||||
|
if(prob(1)) //1% chance for a BIG range.
|
||||||
|
effectrange = rand(1, 100)
|
||||||
|
else
|
||||||
|
effectrange = rand(2,7)
|
||||||
|
if(EFFECT_TOUCH)
|
||||||
|
effectrange = 1
|
||||||
if(can_start_activated && prob(50))
|
if(can_start_activated && prob(50))
|
||||||
ToggleActivate(TRUE, TRUE)
|
ToggleActivate(TRUE, TRUE)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/datum/artifact_effect/dnaswitch
|
/datum/artifact_effect/dnaswitch
|
||||||
name = "DNA Mutator"
|
name = "DNA Mutator"
|
||||||
effect_type = EFFECT_DNASWITCH
|
effect_type = EFFECT_DNASWITCH
|
||||||
var/severity
|
var/effect_strength //This is the % chance PER GENE to MUTATE IT.
|
||||||
|
can_start_activated = FALSE
|
||||||
|
|
||||||
effect_state = "smoke"
|
effect_state = "smoke"
|
||||||
effect_color = "#77ff83"
|
effect_color = "#77ff83"
|
||||||
@@ -9,29 +10,26 @@
|
|||||||
/datum/artifact_effect/dnaswitch/New()
|
/datum/artifact_effect/dnaswitch/New()
|
||||||
..()
|
..()
|
||||||
effect = pick(EFFECT_TOUCH, EFFECT_AURA, EFFECT_PULSE)
|
effect = pick(EFFECT_TOUCH, EFFECT_AURA, EFFECT_PULSE)
|
||||||
if(effect == EFFECT_AURA)
|
if(effect == EFFECT_AURA) //Quite dangerous.
|
||||||
severity = rand(10,50)
|
effect_strength = rand(2,5)
|
||||||
else if(effect == EFFECT_PULSE)
|
else if(effect == EFFECT_PULSE) //This only happens every 40 to 240 seconds.
|
||||||
severity = rand(5,25)
|
effect_strength = rand(1,10)
|
||||||
else
|
else
|
||||||
severity = rand(20,90)
|
effect_strength = rand(10,20) //This one is SUPER beneficial to the geneticist, as they can mutate monkeys.
|
||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
|
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
|
||||||
var/weakness = GetAnomalySusceptibility(toucher)
|
var/weakness = GetAnomalySusceptibility(toucher)
|
||||||
if(ishuman(toucher) && prob(weakness * 100))
|
if(ishuman(toucher) && prob(weakness * 100))
|
||||||
to_chat(toucher, span_notice(span_green("[pick(
|
if(prob(effect_strength))
|
||||||
"You feel a little different.",
|
to_chat(toucher, span_notice(span_green("[pick(
|
||||||
"You feel very strange.",
|
"You feel a little different.",
|
||||||
"Your stomach churns.",
|
"You feel very strange.",
|
||||||
"Your skin feels loose.",
|
"Your stomach churns.",
|
||||||
"You feel a stabbing pain in your head.",
|
"Your skin feels loose.",
|
||||||
"You feel a tingling sensation in your chest.",
|
"You feel a stabbing pain in your head.",
|
||||||
"Your entire body vibrates.")]")))
|
"You feel a tingling sensation in your chest.",
|
||||||
|
"Your entire body vibrates.")]")))
|
||||||
if(prob(75))
|
scramble(1, toucher, weakness * effect_strength)
|
||||||
scramble(1, toucher, weakness * severity)
|
|
||||||
else
|
|
||||||
scramble(0, toucher, weakness * severity)
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
||||||
@@ -46,7 +44,7 @@
|
|||||||
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
|
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||||
var/weakness = GetAnomalySusceptibility(H)
|
var/weakness = GetAnomalySusceptibility(H)
|
||||||
if(prob(weakness * 100))
|
if(prob(weakness * 100))
|
||||||
if(prob(30))
|
if(prob(effect_strength))
|
||||||
to_chat(H, span_notice(span_green("[pick(
|
to_chat(H, span_notice(span_green("[pick(
|
||||||
"You feel a little different.",
|
"You feel a little different.",
|
||||||
"You feel very strange.",
|
"You feel very strange.",
|
||||||
@@ -55,10 +53,7 @@
|
|||||||
"You feel a stabbing pain in your head.",
|
"You feel a stabbing pain in your head.",
|
||||||
"You feel a tingling sensation in your chest.",
|
"You feel a tingling sensation in your chest.",
|
||||||
"Your entire body vibrates.")]")))
|
"Your entire body vibrates.")]")))
|
||||||
if(prob(50))
|
scramble(1, H, weakness * effect_strength)
|
||||||
scramble(1, H, weakness * severity)
|
|
||||||
else
|
|
||||||
scramble(0, H, weakness * severity)
|
|
||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectPulse()
|
/datum/artifact_effect/dnaswitch/DoEffectPulse()
|
||||||
var/atom/holder = get_master_holder()
|
var/atom/holder = get_master_holder()
|
||||||
@@ -72,7 +67,7 @@
|
|||||||
for(var/mob/living/carbon/human/H in range(200, T))
|
for(var/mob/living/carbon/human/H in range(200, T))
|
||||||
var/weakness = GetAnomalySusceptibility(H)
|
var/weakness = GetAnomalySusceptibility(H)
|
||||||
if(prob(weakness * 100))
|
if(prob(weakness * 100))
|
||||||
if(prob(75))
|
if(prob(effect_strength))
|
||||||
to_chat(H, span_notice(span_green("[pick(
|
to_chat(H, span_notice(span_green("[pick(
|
||||||
"You feel a little different.",
|
"You feel a little different.",
|
||||||
"You feel very strange.",
|
"You feel very strange.",
|
||||||
@@ -82,7 +77,4 @@
|
|||||||
"You feel a tingling sensation in your chest.",
|
"You feel a tingling sensation in your chest.",
|
||||||
"Your entire body vibrates.")]")))
|
"Your entire body vibrates.")]")))
|
||||||
if(prob(25))
|
if(prob(25))
|
||||||
if(prob(75))
|
scramble(1, H, weakness * effect_strength)
|
||||||
scramble(1, H, weakness * severity)
|
|
||||||
else
|
|
||||||
scramble(0, H, weakness * severity)
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
/datum/artifact_effect/electric_field/DoEffectTouch(var/mob/user)
|
/datum/artifact_effect/electric_field/DoEffectTouch(var/mob/user)
|
||||||
var/atom/holder = get_master_holder()
|
var/atom/holder = get_master_holder()
|
||||||
|
var/weakness = GetAnomalySusceptibility(user)
|
||||||
if(last_used >= world.time + use_delay)
|
if(last_used >= world.time + use_delay)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
@@ -73,6 +74,9 @@
|
|||||||
light.flicker()
|
light.flicker()
|
||||||
|
|
||||||
for(var/mob/living/L in nearby_mobs)
|
for(var/mob/living/L in nearby_mobs)
|
||||||
|
var/weakness = GetAnomalySusceptibility(L)
|
||||||
|
if(!weakness) //We have protection on!
|
||||||
|
continue
|
||||||
if(L.isSynthetic())
|
if(L.isSynthetic())
|
||||||
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
|
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
|
||||||
L.stuttering += 3
|
L.stuttering += 3
|
||||||
@@ -80,12 +84,12 @@
|
|||||||
if(ishuman(L))
|
if(ishuman(L))
|
||||||
var/mob/living/carbon/human/H = L
|
var/mob/living/carbon/human/H = L
|
||||||
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
|
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
|
||||||
H.electrocute_act(rand(1, 10), holder, H.get_siemens_coefficient_organ(affected), affected)
|
H.electrocute_act(rand(1, 10) * weakness, holder, H.get_siemens_coefficient_organ(affected), affected)
|
||||||
var/turf/T = get_turf(L)
|
var/turf/T = get_turf(L)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
lightning_strike(T, TRUE)
|
lightning_strike(T, TRUE)
|
||||||
else
|
else
|
||||||
L.electrocute_act(rand(1, 10), holder, 0.75, BP_TORSO)
|
L.electrocute_act(rand(1, 10) * weakness, holder, 0.75, BP_TORSO)
|
||||||
var/turf/T = get_turf(L)
|
var/turf/T = get_turf(L)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
lightning_strike(T, TRUE)
|
lightning_strike(T, TRUE)
|
||||||
@@ -115,6 +119,9 @@
|
|||||||
light.flicker()
|
light.flicker()
|
||||||
|
|
||||||
for(var/mob/living/L in nearby_mobs)
|
for(var/mob/living/L in nearby_mobs)
|
||||||
|
var/weakness = GetAnomalySusceptibility(L)
|
||||||
|
if(!weakness) //We have protection on!
|
||||||
|
continue
|
||||||
if(L.isSynthetic())
|
if(L.isSynthetic())
|
||||||
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
|
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
|
||||||
L.stuttering += 3
|
L.stuttering += 3
|
||||||
@@ -122,12 +129,12 @@
|
|||||||
if(ishuman(L))
|
if(ishuman(L))
|
||||||
var/mob/living/carbon/human/H = L
|
var/mob/living/carbon/human/H = L
|
||||||
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
|
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
|
||||||
H.electrocute_act(rand(10, 30), holder, H.get_siemens_coefficient_organ(affected), affected)
|
H.electrocute_act(rand(10, 30) * weakness, holder, H.get_siemens_coefficient_organ(affected), affected)
|
||||||
var/turf/T = get_turf(L)
|
var/turf/T = get_turf(L)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
lightning_strike(T, TRUE)
|
lightning_strike(T, TRUE)
|
||||||
else
|
else
|
||||||
L.electrocute_act(rand(10, 30), holder, 0.75, BP_TORSO)
|
L.electrocute_act(rand(10, 30) * weakness, holder, 0.75, BP_TORSO)
|
||||||
var/turf/T = get_turf(L)
|
var/turf/T = get_turf(L)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
lightning_strike(T, TRUE)
|
lightning_strike(T, TRUE)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"tgui": "workspace:*",
|
"tgui": "workspace:*",
|
||||||
"tgui-core": "^4.0.1"
|
"tgui-core": "^4.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^19.1.0",
|
"@types/react": "^19.1.0",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"tgui": "workspace:*",
|
"tgui": "workspace:*",
|
||||||
"tgui-core": "^4.0.1",
|
"tgui-core": "^4.0.3",
|
||||||
"tgui-dev-server": "workspace:*"
|
"tgui-dev-server": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"tgui": "workspace:*",
|
"tgui": "workspace:*",
|
||||||
"tgui-core": "^4.0.1"
|
"tgui-core": "^4.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^19.1.0",
|
"@types/react": "^19.1.0",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
import { perf } from 'common/perf';
|
import { perf } from 'common/perf';
|
||||||
import { createAction } from 'common/redux';
|
import { createAction } from 'common/redux';
|
||||||
import { globalEvents } from 'tgui-core/events';
|
|
||||||
import type { BooleanLike } from 'tgui-core/react';
|
import type { BooleanLike } from 'tgui-core/react';
|
||||||
|
|
||||||
import { setupDrag } from './drag';
|
import { setupDrag } from './drag';
|
||||||
@@ -97,14 +96,6 @@ export const backendReducer = (state = initialState, action) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'byond/ctrldown') {
|
|
||||||
globalEvents.emit('byond/ctrldown');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'byond/ctrlup') {
|
|
||||||
globalEvents.emit('byond/ctrlup');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'backend/suspendStart') {
|
if (type === 'backend/suspendStart') {
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
@@ -154,22 +145,6 @@ export const backendMiddleware = (store) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'byond/mousedown') {
|
|
||||||
globalEvents.emit('byond/mousedown');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'byond/mouseup') {
|
|
||||||
globalEvents.emit('byond/mouseup');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'byond/ctrldown') {
|
|
||||||
globalEvents.emit('byond/ctrldown');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'byond/ctrlup') {
|
|
||||||
globalEvents.emit('byond/ctrlup');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'backend/suspendStart' && !suspendInterval) {
|
if (type === 'backend/suspendStart' && !suspendInterval) {
|
||||||
logger.log(`suspending (${Byond.windowId})`);
|
logger.log(`suspending (${Byond.windowId})`);
|
||||||
// Keep sending suspend messages until it succeeds.
|
// Keep sending suspend messages until it succeeds.
|
||||||
|
|||||||
@@ -40,10 +40,7 @@ export const DNAModifierBlocks = (props: {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
dnaBlocks.push(
|
dnaBlocks.push(
|
||||||
<Stack.Item
|
<Stack.Item mb="1rem">
|
||||||
mb="1rem"
|
|
||||||
style={realBlock === 1 ? { marginLeft: '0.5em' } : {}} // Remove once tgui core uses gap
|
|
||||||
>
|
|
||||||
<Box
|
<Box
|
||||||
inline
|
inline
|
||||||
width="20px"
|
width="20px"
|
||||||
|
|||||||
@@ -121,17 +121,15 @@ export const SubtabBody = (props: {
|
|||||||
</Button>
|
</Button>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
) : null}
|
) : null}
|
||||||
{
|
<LabeledList.Item label="Digitigrade">
|
||||||
<LabeledList.Item label="Digitigrade">
|
<Button
|
||||||
<Button
|
inline
|
||||||
inline
|
onClick={() => act('digitigrade')}
|
||||||
onClick={() => act('digitigrade')}
|
selected={digitigrade}
|
||||||
selected={digitigrade}
|
>
|
||||||
>
|
{digitigrade ? 'Yes' : 'No'}
|
||||||
{digitigrade ? 'Yes' : 'No'}
|
</Button>
|
||||||
</Button>
|
</LabeledList.Item>
|
||||||
</LabeledList.Item>
|
|
||||||
}
|
|
||||||
<LabeledList.Item label="Blood Type">
|
<LabeledList.Item label="Blood Type">
|
||||||
<Button inline onClick={() => act('blood_type')}>
|
<Button inline onClick={() => act('blood_type')}>
|
||||||
{b_type}
|
{b_type}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"marked": "^4.3.0",
|
"marked": "^4.3.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"tgui-core": "^4.0.1",
|
"tgui-core": "^4.0.3",
|
||||||
"tgui-dev-server": "workspace:*"
|
"tgui-dev-server": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -7911,20 +7911,20 @@ __metadata:
|
|||||||
react: "npm:^19.1.0"
|
react: "npm:^19.1.0"
|
||||||
react-dom: "npm:^19.1.0"
|
react-dom: "npm:^19.1.0"
|
||||||
tgui: "workspace:*"
|
tgui: "workspace:*"
|
||||||
tgui-core: "npm:^4.0.1"
|
tgui-core: "npm:^4.0.3"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"tgui-core@npm:^4.0.1":
|
"tgui-core@npm:^4.0.3":
|
||||||
version: 4.0.1
|
version: 4.0.3
|
||||||
resolution: "tgui-core@npm:4.0.1"
|
resolution: "tgui-core@npm:4.0.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@floating-ui/react": "npm:^0.27.8"
|
"@floating-ui/react": "npm:^0.27.8"
|
||||||
"@nozbe/microfuzz": "npm:^1.0.0"
|
"@nozbe/microfuzz": "npm:^1.0.0"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^19.1.0
|
react: ^19.1.0
|
||||||
react-dom: ^19.1.0
|
react-dom: ^19.1.0
|
||||||
checksum: 10c0/dc15e1f615395fb62dc7445a68b5bb5b1a102993f5fbf2efe38c190e2608c13da7e78246e328bd5461059f554471ecd08e72719c7d409e5a79f8e2e96ddb81b3
|
checksum: 10c0/01b5a4144931bf89113b0c263db86020fbf46398eb4c982a26781a9565f41fb204e07dd9c57e9bd2f4bd6ada9029d9618560dab47b3ecfaf91ecb76295a9248f
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -7952,7 +7952,7 @@ __metadata:
|
|||||||
react: "npm:^19.1.0"
|
react: "npm:^19.1.0"
|
||||||
react-dom: "npm:^19.1.0"
|
react-dom: "npm:^19.1.0"
|
||||||
tgui: "workspace:*"
|
tgui: "workspace:*"
|
||||||
tgui-core: "npm:^4.0.1"
|
tgui-core: "npm:^4.0.3"
|
||||||
tgui-dev-server: "workspace:*"
|
tgui-dev-server: "workspace:*"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@@ -7967,7 +7967,7 @@ __metadata:
|
|||||||
react: "npm:^19.1.0"
|
react: "npm:^19.1.0"
|
||||||
react-dom: "npm:^19.1.0"
|
react-dom: "npm:^19.1.0"
|
||||||
tgui: "workspace:*"
|
tgui: "workspace:*"
|
||||||
tgui-core: "npm:^4.0.1"
|
tgui-core: "npm:^4.0.3"
|
||||||
vitest: "npm:^3.1.1"
|
vitest: "npm:^3.1.1"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@@ -8026,7 +8026,7 @@ __metadata:
|
|||||||
marked: "npm:^4.3.0"
|
marked: "npm:^4.3.0"
|
||||||
react: "npm:^19.1.0"
|
react: "npm:^19.1.0"
|
||||||
react-dom: "npm:^19.1.0"
|
react-dom: "npm:^19.1.0"
|
||||||
tgui-core: "npm:^4.0.1"
|
tgui-core: "npm:^4.0.3"
|
||||||
tgui-dev-server: "workspace:*"
|
tgui-dev-server: "workspace:*"
|
||||||
vitest: "npm:^3.1.1"
|
vitest: "npm:^3.1.1"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
|
|||||||
Reference in New Issue
Block a user