Xenoarch adjustments (#17801)

* Xenoarch adjustments

* tgui
This commit is contained in:
Cameron Lennox
2025-06-05 16:11:35 +02:00
committed by GitHub
parent 9899a1d2e7
commit 80e204094b
10 changed files with 69 additions and 64 deletions
+1 -1
View File
@@ -66,7 +66,7 @@
if(prob(prob))
M.dna.SetSEValue(i,rand(1,4095),1)
M.dna.UpdateSE()
domutcheck(M, null)
domutcheck(M, null, MUTCHK_FORCED|MUTCHK_HIDEMSG)
M.UpdateAppearance()
return
+23 -14
View File
@@ -20,7 +20,7 @@
// The last time the effect was toggled.
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
/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)]"
//random charge time and distance
switch(pick(100;1, 50;2, 25;3))
if(1)
//short range, short charge time
chargelevelmax = rand(3, 20)
effectrange = rand(1, 3)
if(2)
//medium range, medium charge time
chargelevelmax = rand(15, 40)
effectrange = rand(5, 15)
if(3)
//large range, long charge time
chargelevelmax = rand(20, 120)
effectrange = rand(20, 100)
switch(effect)
if(EFFECT_PULSE)
switch(pick(100;1, 50;2, 25;3))
if(1)
//short range, short charge time
chargelevelmax = rand(3, 20)
effectrange = rand(1, 3)
if(2)
//medium range, medium charge time
chargelevelmax = rand(15, 40)
effectrange = rand(5, 15)
if(3)
//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))
ToggleActivate(TRUE, TRUE)
@@ -1,7 +1,8 @@
/datum/artifact_effect/dnaswitch
name = "DNA Mutator"
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_color = "#77ff83"
@@ -9,29 +10,26 @@
/datum/artifact_effect/dnaswitch/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA, EFFECT_PULSE)
if(effect == EFFECT_AURA)
severity = rand(10,50)
else if(effect == EFFECT_PULSE)
severity = rand(5,25)
if(effect == EFFECT_AURA) //Quite dangerous.
effect_strength = rand(2,5)
else if(effect == EFFECT_PULSE) //This only happens every 40 to 240 seconds.
effect_strength = rand(1,10)
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)
var/weakness = GetAnomalySusceptibility(toucher)
if(ishuman(toucher) && prob(weakness * 100))
to_chat(toucher, span_notice(span_green("[pick(
"You feel a little different.",
"You feel very strange.",
"Your stomach churns.",
"Your skin feels loose.",
"You feel a stabbing pain in your head.",
"You feel a tingling sensation in your chest.",
"Your entire body vibrates.")]")))
if(prob(75))
scramble(1, toucher, weakness * severity)
else
scramble(0, toucher, weakness * severity)
if(prob(effect_strength))
to_chat(toucher, span_notice(span_green("[pick(
"You feel a little different.",
"You feel very strange.",
"Your stomach churns.",
"Your skin feels loose.",
"You feel a stabbing pain in your head.",
"You feel a tingling sensation in your chest.",
"Your entire body vibrates.")]")))
scramble(1, toucher, weakness * effect_strength)
return 1
/datum/artifact_effect/dnaswitch/DoEffectAura()
@@ -46,7 +44,7 @@
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(30))
if(prob(effect_strength))
to_chat(H, span_notice(span_green("[pick(
"You feel a little different.",
"You feel very strange.",
@@ -55,10 +53,7 @@
"You feel a stabbing pain in your head.",
"You feel a tingling sensation in your chest.",
"Your entire body vibrates.")]")))
if(prob(50))
scramble(1, H, weakness * severity)
else
scramble(0, H, weakness * severity)
scramble(1, H, weakness * effect_strength)
/datum/artifact_effect/dnaswitch/DoEffectPulse()
var/atom/holder = get_master_holder()
@@ -72,7 +67,7 @@
for(var/mob/living/carbon/human/H in range(200, T))
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(75))
if(prob(effect_strength))
to_chat(H, span_notice(span_green("[pick(
"You feel a little different.",
"You feel very strange.",
@@ -82,7 +77,4 @@
"You feel a tingling sensation in your chest.",
"Your entire body vibrates.")]")))
if(prob(25))
if(prob(75))
scramble(1, H, weakness * severity)
else
scramble(0, H, weakness * severity)
scramble(1, H, weakness * effect_strength)
@@ -9,6 +9,7 @@
/datum/artifact_effect/electric_field/DoEffectTouch(var/mob/user)
var/atom/holder = get_master_holder()
var/weakness = GetAnomalySusceptibility(user)
if(last_used >= world.time + use_delay)
return
else
@@ -73,6 +74,9 @@
light.flicker()
for(var/mob/living/L in nearby_mobs)
var/weakness = GetAnomalySusceptibility(L)
if(!weakness) //We have protection on!
continue
if(L.isSynthetic())
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
L.stuttering += 3
@@ -80,12 +84,12 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
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)
if(istype(T))
lightning_strike(T, TRUE)
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)
if(istype(T))
lightning_strike(T, TRUE)
@@ -115,6 +119,9 @@
light.flicker()
for(var/mob/living/L in nearby_mobs)
var/weakness = GetAnomalySusceptibility(L)
if(!weakness) //We have protection on!
continue
if(L.isSynthetic())
to_chat(L, span_danger("ERROR: Electrical fault detected!"))
L.stuttering += 3
@@ -122,12 +129,12 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
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)
if(istype(T))
lightning_strike(T, TRUE)
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)
if(istype(T))
lightning_strike(T, TRUE)
+1 -1
View File
@@ -11,7 +11,7 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tgui": "workspace:*",
"tgui-core": "^4.0.2"
"tgui-core": "^4.0.3"
},
"devDependencies": {
"@types/react": "^19.1.0",
+1 -1
View File
@@ -8,7 +8,7 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tgui": "workspace:*",
"tgui-core": "^4.0.2",
"tgui-core": "^4.0.3",
"tgui-dev-server": "workspace:*"
},
"devDependencies": {
+1 -1
View File
@@ -7,7 +7,7 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tgui": "workspace:*",
"tgui-core": "^4.0.2"
"tgui-core": "^4.0.3"
},
"devDependencies": {
"@types/react": "^19.1.0",
@@ -40,10 +40,7 @@ export const DNAModifierBlocks = (props: {
);
}
dnaBlocks.push(
<Stack.Item
mb="1rem"
style={realBlock === 1 ? { marginLeft: '0.5em' } : {}} // Remove once tgui core uses gap
>
<Stack.Item mb="1rem">
<Box
inline
width="20px"
+1 -1
View File
@@ -12,7 +12,7 @@
"marked": "^4.3.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tgui-core": "^4.0.2",
"tgui-core": "^4.0.3",
"tgui-dev-server": "workspace:*"
},
"devDependencies": {
+8 -8
View File
@@ -7911,20 +7911,20 @@ __metadata:
react: "npm:^19.1.0"
react-dom: "npm:^19.1.0"
tgui: "workspace:*"
tgui-core: "npm:^4.0.2"
tgui-core: "npm:^4.0.3"
languageName: unknown
linkType: soft
"tgui-core@npm:^4.0.2":
version: 4.0.2
resolution: "tgui-core@npm:4.0.2"
"tgui-core@npm:^4.0.3":
version: 4.0.3
resolution: "tgui-core@npm:4.0.3"
dependencies:
"@floating-ui/react": "npm:^0.27.8"
"@nozbe/microfuzz": "npm:^1.0.0"
peerDependencies:
react: ^19.1.0
react-dom: ^19.1.0
checksum: 10c0/685b933d0083a1bf2349d8a86aa8b16ca8da0d0ac83cd0e287f7450b88c08bb41a53140561c77269ad73de030401742dae3fd011113c38e07fbc3f233ddcb1af
checksum: 10c0/01b5a4144931bf89113b0c263db86020fbf46398eb4c982a26781a9565f41fb204e07dd9c57e9bd2f4bd6ada9029d9618560dab47b3ecfaf91ecb76295a9248f
languageName: node
linkType: hard
@@ -7952,7 +7952,7 @@ __metadata:
react: "npm:^19.1.0"
react-dom: "npm:^19.1.0"
tgui: "workspace:*"
tgui-core: "npm:^4.0.2"
tgui-core: "npm:^4.0.3"
tgui-dev-server: "workspace:*"
languageName: unknown
linkType: soft
@@ -7967,7 +7967,7 @@ __metadata:
react: "npm:^19.1.0"
react-dom: "npm:^19.1.0"
tgui: "workspace:*"
tgui-core: "npm:^4.0.2"
tgui-core: "npm:^4.0.3"
vitest: "npm:^3.1.1"
languageName: unknown
linkType: soft
@@ -8026,7 +8026,7 @@ __metadata:
marked: "npm:^4.3.0"
react: "npm:^19.1.0"
react-dom: "npm:^19.1.0"
tgui-core: "npm:^4.0.2"
tgui-core: "npm:^4.0.3"
tgui-dev-server: "workspace:*"
vitest: "npm:^3.1.1"
languageName: unknown