mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] More xenoarch artifact tweaks (#10461)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9b16fba6d8
commit
27e2ce616b
@@ -653,14 +653,14 @@ var/list/mining_overlay_cache = list()
|
|||||||
var/pain = 0
|
var/pain = 0
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
pain = 1
|
pain = 1
|
||||||
for(var/mob/living/M in range(src, 200))
|
for(var/mob/living/M in range(src, 5)) //Let's only hit people nearby us.
|
||||||
to_chat(M, span_danger("[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!"))
|
to_chat(M, span_danger("[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!"))
|
||||||
if(pain)
|
if(pain)
|
||||||
flick("pain",M.pain)
|
flick("pain",M.pain)
|
||||||
M.flash_eyes()
|
M.flash_eyes()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
M.Stun(5)
|
M.Stun(5)
|
||||||
M.make_jittery(1000) //SHAKY
|
M.make_jittery(50) //SHAKY this used to be 1000(seizure) but I toned it to 50 to be less aggressive.
|
||||||
if(prob(25))
|
if(prob(25))
|
||||||
excavate_find(prob(25), finds[1])
|
excavate_find(prob(25), finds[1])
|
||||||
else if(rand(1,500) == 1)
|
else if(rand(1,500) == 1)
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/machinery/artifact/Initialize(mapload)
|
/obj/machinery/artifact/Initialize(mapload)
|
||||||
. = ..()
|
|
||||||
|
|
||||||
if(ispath(artifact_master))
|
if(ispath(artifact_master))
|
||||||
AddComponent(artifact_master)
|
AddComponent(artifact_master)
|
||||||
@@ -78,7 +77,9 @@
|
|||||||
name = "intricately carved statue"
|
name = "intricately carved statue"
|
||||||
desc = "A strange statue."
|
desc = "A strange statue."
|
||||||
my_effect.trigger = pick(TRIGGER_TOUCH, TRIGGER_HEAT, TRIGGER_COLD)
|
my_effect.trigger = pick(TRIGGER_TOUCH, TRIGGER_HEAT, TRIGGER_COLD)
|
||||||
|
artifact_master.do_large_randomization()
|
||||||
|
. = ..()
|
||||||
|
update_icon()
|
||||||
/obj/machinery/artifact/update_icon()
|
/obj/machinery/artifact/update_icon()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
// 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!
|
||||||
|
var/can_start_activated = TRUE
|
||||||
|
|
||||||
/datum/artifact_effect/Destroy()
|
/datum/artifact_effect/Destroy()
|
||||||
master = null //Master still exists even if our effect gets destroyed. No need to qdel_null.
|
master = null //Master still exists even if our effect gets destroyed. No need to qdel_null.
|
||||||
@@ -61,29 +63,31 @@
|
|||||||
if(3)
|
if(3)
|
||||||
//large range, long charge time
|
//large range, long charge time
|
||||||
chargelevelmax = rand(20, 120)
|
chargelevelmax = rand(20, 120)
|
||||||
effectrange = rand(20, 100) //VOREStation Edit - Map size.
|
effectrange = rand(20, 100)
|
||||||
|
if(can_start_activated && prob(50))
|
||||||
|
ToggleActivate(TRUE, TRUE)
|
||||||
|
|
||||||
/datum/artifact_effect/proc/ToggleActivate(var/reveal_toggle = 1)
|
/datum/artifact_effect/proc/ToggleActivate(var/reveal_toggle = TRUE, var/spawn_toggle = FALSE)
|
||||||
//so that other stuff happens first
|
//so that other stuff happens first
|
||||||
set waitfor = FALSE
|
set waitfor = FALSE
|
||||||
|
|
||||||
var/atom/target = get_master_holder()
|
var/atom/target = get_master_holder()
|
||||||
|
|
||||||
|
|
||||||
if(world.time - last_activation > 1 SECOND)
|
if(world.time - last_activation > 1 SECOND)
|
||||||
last_activation = world.time
|
last_activation = world.time
|
||||||
if(activated)
|
if(activated)
|
||||||
activated = 0
|
activated = FALSE
|
||||||
else
|
else
|
||||||
activated = 1
|
activated = TRUE
|
||||||
if(reveal_toggle && target)
|
if(reveal_toggle && target)
|
||||||
if(!isliving(target))
|
if(!isliving(target) && !(spawn_toggle && istype(target, /obj/machinery/artifact))) //This is to keep it from updating icons if our owner is a large artifact
|
||||||
target.update_icon()
|
target.update_icon() //As it will runtime since it hasn't set it's artifact_master yet. The update icon is handled in /obj/machinery/artifact/Initialize()
|
||||||
var/display_msg
|
var/display_msg
|
||||||
if(activated)
|
if(activated)
|
||||||
display_msg = pick("momentarily glows brightly!","distorts slightly for a moment!","flickers slightly!","vibrates!","shimmers slightly for a moment!")
|
display_msg = pick("momentarily glows brightly!","distorts slightly for a moment!","flickers slightly!","vibrates!","shimmers slightly for a moment!")
|
||||||
else
|
else
|
||||||
display_msg = pick("grows dull!","fades in intensity!","suddenly becomes very still!","suddenly becomes very quiet!")
|
display_msg = pick("grows dull!","fades in intensity!","suddenly becomes very still!","suddenly becomes very quiet!")
|
||||||
|
|
||||||
if(active_effect)
|
if(active_effect)
|
||||||
if(activated)
|
if(activated)
|
||||||
target.underlays.Add(active_effect)
|
target.underlays.Add(active_effect)
|
||||||
@@ -192,6 +196,7 @@
|
|||||||
. += " Activation index involves " + span_bold("precise temperature conditions.") + " Heating/Cooling the atmosphere (>[ARTIFACT_HEAT_TRIGGER]K or <[ARTIFACT_COLD_TRIGGER]K) or using a welder are potential triggers."
|
. += " Activation index involves " + span_bold("precise temperature conditions.") + " Heating/Cooling the atmosphere (>[ARTIFACT_HEAT_TRIGGER]K or <[ARTIFACT_COLD_TRIGGER]K) or using a welder are potential triggers."
|
||||||
else
|
else
|
||||||
. += " Unable to determine any data about activation trigger."
|
. += " Unable to determine any data about activation trigger."
|
||||||
|
. += "<br>"
|
||||||
|
|
||||||
//returns 0..1, with 1 being no protection and 0 being fully protected
|
//returns 0..1, with 1 being no protection and 0 being fully protected
|
||||||
/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
|
/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -79,6 +79,12 @@ var/list/toxic_reagents = list(TOXIN_PATH)
|
|||||||
do_setup()
|
do_setup()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
// This handles the randomization for large artifacts. This allows them to spawn in and do the 50/50 to see if they'll be activated or not.
|
||||||
|
/datum/component/artifact_master/proc/do_large_randomization()
|
||||||
|
for(var/datum/artifact_effect/my_effect in my_effects)
|
||||||
|
if(my_effect.can_start_activated && prob(50))
|
||||||
|
my_effect.ToggleActivate(TRUE, TRUE)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Component System Registry.
|
* Component System Registry.
|
||||||
* Here be dragons.
|
* Here be dragons.
|
||||||
@@ -269,9 +275,12 @@ var/list/toxic_reagents = list(TOXIN_PATH)
|
|||||||
else if(ishuman(bumped) && GetAnomalySusceptibility(bumped) >= 0.5)
|
else if(ishuman(bumped) && GetAnomalySusceptibility(bumped) >= 0.5)
|
||||||
if (my_effect.trigger == TRIGGER_TOUCH)
|
if (my_effect.trigger == TRIGGER_TOUCH)
|
||||||
my_effect.ToggleActivate()
|
my_effect.ToggleActivate()
|
||||||
|
warn = 1
|
||||||
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
||||||
my_effect.DoEffectTouch(bumped)
|
my_effect.DoEffectTouch(bumped)
|
||||||
warn = 1
|
continue //We activated it, go ahead and move on to the next. If we don't continue, we hit them with the effect again.
|
||||||
|
if(my_effect.effect == EFFECT_TOUCH && my_effect.activated) //We are activated and have a touch effect!
|
||||||
|
my_effect.DoEffectTouch(bumped)
|
||||||
|
|
||||||
if(warn && isliving(bumped))
|
if(warn && isliving(bumped))
|
||||||
to_chat(bumped, span_filter_notice(span_bold("You accidentally touch \the [holder] as it hits you.")))
|
to_chat(bumped, span_filter_notice(span_bold("You accidentally touch \the [holder] as it hits you.")))
|
||||||
@@ -286,11 +295,15 @@ var/list/toxic_reagents = list(TOXIN_PATH)
|
|||||||
my_effect.ToggleActivate()
|
my_effect.ToggleActivate()
|
||||||
|
|
||||||
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
|
else if(ishuman(M) && !istype(M:gloves,/obj/item/clothing/gloves))
|
||||||
if (my_effect.trigger == TRIGGER_TOUCH)
|
if(my_effect.trigger == TRIGGER_TOUCH)
|
||||||
my_effect.ToggleActivate(M)
|
my_effect.ToggleActivate(M)
|
||||||
|
warn = 1
|
||||||
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
||||||
my_effect.DoEffectTouch(M)
|
my_effect.DoEffectTouch(M)
|
||||||
warn = 1
|
continue //We activated it, go ahead and move on to the next. If we don't continue, we hit them with the effect again.
|
||||||
|
if(my_effect.effect == EFFECT_TOUCH && my_effect.activated) //We are activated and have a touch effect!
|
||||||
|
my_effect.DoEffectTouch(M)
|
||||||
|
|
||||||
|
|
||||||
if(warn && isliving(M))
|
if(warn && isliving(M))
|
||||||
to_chat(M, span_filter_notice(span_bold("You accidentally touch \the [holder].")))
|
to_chat(M, span_filter_notice(span_bold("You accidentally touch \the [holder].")))
|
||||||
@@ -313,6 +326,9 @@ var/list/toxic_reagents = list(TOXIN_PATH)
|
|||||||
my_effect.ToggleActivate()
|
my_effect.ToggleActivate()
|
||||||
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
if(my_effect.activated && my_effect.effect == EFFECT_TOUCH)
|
||||||
my_effect.DoEffectTouch(user)
|
my_effect.DoEffectTouch(user)
|
||||||
|
continue //We activated it, go ahead and move on to the next. If we don't continue, we hit them with the effect again.
|
||||||
|
if(my_effect.effect == EFFECT_TOUCH && my_effect.activated) //We are activated and have a touch effect!
|
||||||
|
my_effect.DoEffectTouch(user)
|
||||||
|
|
||||||
if(triggered)
|
if(triggered)
|
||||||
to_chat(user, span_filter_notice(span_bold("You touch [holder].")))
|
to_chat(user, span_filter_notice(span_bold("You touch [holder].")))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
var/random = TRUE
|
var/random = TRUE
|
||||||
effect_type = EFFECT_GAS
|
effect_type = EFFECT_GAS
|
||||||
effect = EFFECT_AURA
|
effect = EFFECT_AURA
|
||||||
|
can_start_activated = FALSE //This is set to FALSE so we do NOT CREATE IMMEDIATE HELLFIRES
|
||||||
|
|
||||||
effect_color = "#a5a5a5"
|
effect_color = "#a5a5a5"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/datum/find
|
/datum/find
|
||||||
var/find_type = 0 //random according to the digsite type
|
var/find_type = 0 //random according to the digsite type
|
||||||
var/excavation_required = 0 //random 10 - 190
|
var/excavation_required = 0 //random 10 - 190
|
||||||
var/view_range = 40 //how close excavation has to come to show an overlay on the turf
|
var/view_range = 200 //how close excavation has to come to show an overlay on the turf
|
||||||
var/prob_delicate = 0 //probability it requires an active suspension field to not insta-crumble. Set to 0 to nullify the need for suspension field.
|
var/prob_delicate = 0 //probability it requires an active suspension field to not insta-crumble. Set to 0 to nullify the need for suspension field.
|
||||||
|
|
||||||
/datum/find/New(var/digsite, var/exc_req)
|
/datum/find/New(var/digsite, var/exc_req)
|
||||||
|
|||||||
Reference in New Issue
Block a user