Merge branch 'master' into TGUIs_Nexties
This commit is contained in:
34
code/modules/antagonists/abductor/abductee/abductee.dm
Normal file
34
code/modules/antagonists/abductor/abductee/abductee.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
/datum/antagonist/abductee
|
||||
name = "Abductee"
|
||||
roundend_category = "abductees"
|
||||
antagpanel_category = "Abductee"
|
||||
var/datum/brain_trauma/abductee/brain_trauma
|
||||
|
||||
/datum/antagonist/abductee/on_gain()
|
||||
give_objective()
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/abductee/greet()
|
||||
to_chat(owner, "<span class='warning'><b>Your mind snaps!</b></span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>You can't remember how you got here...</b></span></big>")
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/abductee/proc/give_objective()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(istype(H))
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
var/objtype = (prob(75) ? /datum/objective/abductee/random : pick(subtypesof(/datum/objective/abductee/) - /datum/objective/abductee/random))
|
||||
var/datum/objective/abductee/O = new objtype()
|
||||
objectives += O
|
||||
|
||||
/datum/antagonist/abductee/apply_innate_effects(mob/living/mob_override)
|
||||
update_abductor_icons_added(mob_override ? mob_override.mind : owner,"abductee")
|
||||
var/mob/living/carbon/C = mob_override || owner?.current
|
||||
if(istype(C))
|
||||
if(brain_trauma)
|
||||
qdel(brain_trauma) //make sure there's no lingering trauma
|
||||
brain_trauma = C.gain_trauma(/datum/brain_trauma/abductee, TRAUMA_RESILIENCE_SURGERY)
|
||||
|
||||
/datum/antagonist/abductee/remove_innate_effects(mob/living/mob_override)
|
||||
update_abductor_icons_removed(mob_override ? mob_override.mind : owner)
|
||||
qdel(brain_trauma)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/datum/objective/abductee/paint/New()
|
||||
var/color = pick(list("red", "blue", "green", "yellow", "orange", "purple", "black", "in rainbows", "in blood"))
|
||||
explanation_text+= " [color]!"
|
||||
explanation_text = " [color]!"
|
||||
|
||||
/datum/objective/abductee/speech
|
||||
explanation_text = "Your brain is broken... you can only communicate in"
|
||||
|
||||
18
code/modules/antagonists/abductor/abductee/trauma.dm
Normal file
18
code/modules/antagonists/abductor/abductee/trauma.dm
Normal file
@@ -0,0 +1,18 @@
|
||||
/datum/brain_trauma/abductee
|
||||
name = "abductee mindsnapped"
|
||||
desc = "The patient's brain has been scrambled by experimental procedures."
|
||||
scan_desc = "brain scrambling"
|
||||
gain_text = "<span class='danger'>Your mind snaps.. you feel fragmented.</span>"
|
||||
lose_text = "<span class='boldnotice'>Your mind heals itself and you feel whole again.</span>"
|
||||
random_gain = FALSE
|
||||
clonable = TRUE
|
||||
|
||||
/datum/brain_trauma/abductee/on_gain()
|
||||
. = ..()
|
||||
if(owner.mind)
|
||||
if(!owner.mind.has_antag_datum(/datum/antagonist/abductee))
|
||||
owner.mind.add_antag_datum(/datum/antagonist/abductee)
|
||||
|
||||
/datum/brain_trauma/abductee/on_lose()
|
||||
. = ..()
|
||||
owner.mind?.remove_antag_datum(/datum/antagonist/abductee)
|
||||
@@ -159,35 +159,6 @@
|
||||
|
||||
return "<div class='panel redborder'>[result.Join("<br>")]</div>"
|
||||
|
||||
/datum/antagonist/abductee
|
||||
name = "Abductee"
|
||||
roundend_category = "abductees"
|
||||
antagpanel_category = "Abductee"
|
||||
|
||||
/datum/antagonist/abductee/on_gain()
|
||||
give_objective()
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/abductee/greet()
|
||||
to_chat(owner, "<span class='warning'><b>Your mind snaps!</b></span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>You can't remember how you got here...</b></span></big>")
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/abductee/proc/give_objective()
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(istype(H))
|
||||
H.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
var/objtype = (prob(75) ? /datum/objective/abductee/random : pick(subtypesof(/datum/objective/abductee/) - /datum/objective/abductee/random))
|
||||
var/datum/objective/abductee/O = new objtype()
|
||||
objectives += O
|
||||
|
||||
/datum/antagonist/abductee/apply_innate_effects(mob/living/mob_override)
|
||||
update_abductor_icons_added(mob_override ? mob_override.mind : owner,"abductee")
|
||||
|
||||
/datum/antagonist/abductee/remove_innate_effects(mob/living/mob_override)
|
||||
update_abductor_icons_removed(mob_override ? mob_override.mind : owner)
|
||||
|
||||
|
||||
// LANDMARKS
|
||||
/obj/effect/landmark/abductor
|
||||
var/team_number = 1
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
var/stealth_armor = list("melee" = 15, "bullet" = 15, "laser" = 15, "energy" = 15, "bomb" = 15, "bio" = 15, "rad" = 15, "fire" = 70, "acid" = 70)
|
||||
var/combat_armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 50, "bio" = 50, "rad" = 50, "fire" = 90, "acid" = 90)
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/Initialize()
|
||||
. = ..()
|
||||
stealth_armor = getArmor(arglist(stealth_armor))
|
||||
combat_armor = getArmor(arglist(combat_armor))
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/proc/toggle_nodrop()
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_NODROP, ABDUCTOR_VEST_TRAIT))
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, ABDUCTOR_VEST_TRAIT)
|
||||
|
||||
@@ -22,7 +22,7 @@ Runes can either be invoked by one's self or with many different cultists. Each
|
||||
icon = 'icons/obj/rune.dmi'
|
||||
icon_state = "1"
|
||||
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
layer = LOW_OBJ_LAYER
|
||||
layer = SIGIL_LAYER
|
||||
color = RUNE_COLOR_RED
|
||||
|
||||
var/invocation = "Aiy ele-mayo." //This is said by cultists when the rune is invoked.
|
||||
|
||||
@@ -275,7 +275,8 @@
|
||||
|
||||
/obj/machinery/camera/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
S.DisIntegrate(src)
|
||||
toggle_cam(S, 0)
|
||||
if(!QDELETED(S)) //If it got blown up no need to turn it off.
|
||||
toggle_cam(S, 0)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
|
||||
|
||||
@@ -22,11 +22,19 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
desc = "You aren't entirely sure what this does, but it's very beepy and boopy."
|
||||
background_icon_state = "bg_tech_blue"
|
||||
icon_icon = 'icons/mob/actions/actions_AI.dmi'
|
||||
check_flags = AB_CHECK_CONSCIOUS //can't doomsday if dead.
|
||||
var/mob/living/silicon/ai/owner_AI //The owner AI, so we don't have to typecast every time
|
||||
var/uses //If we have multiple uses of the same power
|
||||
var/auto_use_uses = TRUE //If we automatically use up uses on each activation
|
||||
var/cooldown_period //If applicable, the time in deciseconds we have to wait before using any more modules
|
||||
|
||||
|
||||
/datum/action/innate/ai/New()
|
||||
..()
|
||||
if(uses > 1)
|
||||
desc = "[desc] It has [uses] use\s remaining."
|
||||
button.desc = desc
|
||||
|
||||
/datum/action/innate/ai/Grant(mob/living/L)
|
||||
. = ..()
|
||||
if(!isAI(owner))
|
||||
@@ -38,7 +46,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
/datum/action/innate/ai/IsAvailable()
|
||||
. = ..()
|
||||
if(owner_AI && owner_AI.malf_cooldown > world.time)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
/datum/action/innate/ai/Trigger()
|
||||
. = ..()
|
||||
@@ -49,12 +57,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/proc/adjust_uses(amt, silent)
|
||||
uses += amt
|
||||
if(!silent && uses)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
if(!uses)
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
qdel(src)
|
||||
if(uses)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtonIcon()
|
||||
return
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
//Framework for ranged abilities that can have different effects by left-clicking stuff.
|
||||
/datum/action/innate/ai/ranged
|
||||
@@ -74,13 +86,16 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/ranged/adjust_uses(amt, silent)
|
||||
uses += amt
|
||||
if(!silent && uses)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
if(!uses)
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
Remove(owner)
|
||||
QDEL_IN(src, 100) //let any active timers on us finish up
|
||||
if(uses)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>[name] now has <b>[uses]</b> use[uses > 1 ? "s" : ""] remaining.</span>")
|
||||
desc = "[initial(desc)] It has [uses] use\s remaining."
|
||||
UpdateButtonIcon()
|
||||
return
|
||||
if(initial(uses) > 1) //no need to tell 'em if it was one-use anyway!
|
||||
to_chat(owner, "<span class='warning'>[name] has run out of uses!</span>")
|
||||
Remove(owner)
|
||||
QDEL_IN(src, 100) //let any active timers on us finish up
|
||||
|
||||
/datum/action/innate/ai/ranged/Destroy()
|
||||
QDEL_NULL(linked_ability)
|
||||
@@ -97,7 +112,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
var/datum/action/innate/ai/ranged/attached_action
|
||||
|
||||
/obj/effect/proc_holder/ranged_ai/Destroy()
|
||||
QDEL_NULL(attached_action)
|
||||
attached_action = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/ranged_ai/proc/toggle(mob/user)
|
||||
@@ -185,6 +200,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
A.playsound_local(A, AM.unlock_sound, 50, 0)
|
||||
else //Adding uses to an existing module
|
||||
action.uses += initial(action.uses)
|
||||
action.desc = "[initial(action.desc)] It has [action.uses] use\s remaining."
|
||||
action.UpdateButtonIcon()
|
||||
temp = "Additional use[action.uses > 1 ? "s" : ""] added to [action.name]!"
|
||||
processing_time -= AM.cost
|
||||
|
||||
@@ -238,6 +255,8 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
return
|
||||
if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
|
||||
return
|
||||
if (active)
|
||||
return //prevent the AI from activating an already active doomsday
|
||||
active = TRUE
|
||||
set_us_up_the_bomb(owner)
|
||||
|
||||
@@ -245,64 +264,64 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
set waitfor = FALSE
|
||||
to_chat(owner, "<span class='small boldannounce'>run -o -a 'selfdestruct'</span>")
|
||||
sleep(5)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='small boldannounce'>Running executable 'selfdestruct'...</span>")
|
||||
sleep(rand(10, 30))
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
owner.playsound_local(owner, 'sound/misc/bloblarm.ogg', 50, 0)
|
||||
to_chat(owner, "<span class='userdanger'>!!! UNAUTHORIZED SELF-DESTRUCT ACCESS !!!</span>")
|
||||
to_chat(owner, "<span class='boldannounce'>This is a class-3 security violation. This incident will be reported to Central Command.</span>")
|
||||
for(var/i in 1 to 3)
|
||||
sleep(20)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldannounce'>Sending security report to Central Command.....[rand(0, 9) + (rand(20, 30) * i)]%</span>")
|
||||
sleep(3)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='small boldannounce'>auth 'akjv9c88asdf12nb' ******************</span>")
|
||||
owner.playsound_local(owner, 'sound/items/timer.ogg', 50, 0)
|
||||
sleep(30)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Welcome, akjv9c88asdf12nb.</span>")
|
||||
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
|
||||
sleep(5)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Arm self-destruct device? (Y/N)</span>")
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage1.ogg', 50, 0)
|
||||
sleep(20)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='small boldannounce'>Y</span>")
|
||||
sleep(15)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Confirm arming of self-destruct device? (Y/N)</span>")
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
|
||||
sleep(10)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='small boldannounce'>Y</span>")
|
||||
sleep(rand(15, 25))
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Please repeat password to confirm.</span>")
|
||||
owner.playsound_local(owner, 'sound/misc/compiler-stage2.ogg', 50, 0)
|
||||
sleep(14)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='small boldannounce'>******************</span>")
|
||||
sleep(40)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
to_chat(owner, "<span class='boldnotice'>Credentials accepted. Transmitting arming signal...</span>")
|
||||
owner.playsound_local(owner, 'sound/misc/server-ready.ogg', 50, 0)
|
||||
sleep(30)
|
||||
if(!owner || QDELETED(owner))
|
||||
if(QDELETED(owner) || owner.stat == DEAD)
|
||||
return
|
||||
priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", "aimalf")
|
||||
set_security_level("delta")
|
||||
@@ -724,9 +743,10 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/blackout
|
||||
name = "Blackout"
|
||||
desc = "Overloads lights across the station."
|
||||
desc = "Overloads random lights across the station."
|
||||
button_icon_state = "blackout"
|
||||
uses = 3
|
||||
auto_use_uses = FALSE
|
||||
|
||||
/datum/action/innate/ai/blackout/Activate()
|
||||
for(var/obj/machinery/power/apc/apc in GLOB.apcs_list)
|
||||
@@ -736,6 +756,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
apc.overload++
|
||||
to_chat(owner, "<span class='notice'>Overcurrent applied to the powernet.</span>")
|
||||
owner.playsound_local(owner, "sparks", 50, 0)
|
||||
adjust_uses(-1)
|
||||
|
||||
|
||||
//Disable Emergency Lights
|
||||
@@ -784,11 +805,6 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
auto_use_uses = FALSE
|
||||
cooldown_period = 30
|
||||
|
||||
/datum/action/innate/ai/reactivate_cameras/New()
|
||||
..()
|
||||
desc = "[desc] There are 30 reactivations remaining."
|
||||
button.desc = desc
|
||||
|
||||
/datum/action/innate/ai/reactivate_cameras/Activate()
|
||||
var/fixed_cameras = 0
|
||||
for(var/V in GLOB.cameranet.cameras)
|
||||
@@ -803,8 +819,6 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
to_chat(owner, "<span class='notice'>Diagnostic complete! Cameras reactivated: <b>[fixed_cameras]</b>. Reactivations remaining: <b>[uses]</b>.</span>")
|
||||
owner.playsound_local(owner, 'sound/items/wirecutter.ogg', 50, 0)
|
||||
adjust_uses(0, TRUE) //Checks the uses remaining
|
||||
if(src && uses) //Not sure if not having src here would cause a runtime, so it's here to be safe
|
||||
desc = "[initial(desc)] There are [uses] reactivations remaining."
|
||||
|
||||
|
||||
//Upgrade Camera Network: EMP-proofs all cameras, in addition to giving them X-ray vision.
|
||||
|
||||
Reference in New Issue
Block a user