mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
makes decoy AIs more OOP, fixes goliath/ai bug
also makes emagged syndi medbot not drop parts
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
var/sound_no = 'sound/machines/buzz-sigh.ogg'
|
||||
var/sound_click = 'sound/machines/click.ogg'
|
||||
var/area/syndicate_depot/depotarea
|
||||
var/alerts_when_broken = TRUE
|
||||
var/alerts_when_broken = FALSE
|
||||
var/has_alerted = FALSE
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
name = "reactor control computer"
|
||||
icon_screen = "explosive"
|
||||
req_access = list()
|
||||
alerts_when_broken = TRUE
|
||||
|
||||
/obj/machinery/computer/syndicate_depot/selfdestruct/get_menu(var/mob/user)
|
||||
var menutext = {"<B>Syndicate Depot Fusion Reactor Control</B><HR>
|
||||
@@ -194,6 +195,7 @@
|
||||
name = "syndicate communications computer"
|
||||
icon_screen = "syndishuttle"
|
||||
req_access = list()
|
||||
alerts_when_broken = TRUE
|
||||
var/message_sent = FALSE
|
||||
|
||||
/obj/machinery/computer/syndicate_depot/syndiecomms/get_menu(var/mob/user)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/mob/living/silicon/decoy/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
icon_state = "ai-crash"
|
||||
spawn(10)
|
||||
explosion(loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
O.mode = 2
|
||||
return ..(gibbed)
|
||||
if(O.z == z)
|
||||
O.mode = 2
|
||||
..(0)
|
||||
gib()
|
||||
@@ -12,6 +12,11 @@
|
||||
src.anchored = 1
|
||||
src.canmove = 0
|
||||
|
||||
/mob/living/silicon/decoy/attackby(var/obj/item/W, var/mob/user, params)
|
||||
if(istype(W, /obj/item/aicard))
|
||||
user.visible_message("<span class='notice'>[user] cannot find an intellicard slot on [src].</span>")
|
||||
else
|
||||
return ..(W, user, params)
|
||||
|
||||
/mob/living/silicon/decoy/syndicate
|
||||
faction = list("syndicate")
|
||||
@@ -23,21 +28,11 @@
|
||||
. = ..()
|
||||
icon_state = "ai-magma"
|
||||
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot
|
||||
var/exploded = FALSE
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/proc/explode()
|
||||
if(!exploded)
|
||||
exploded = TRUE
|
||||
raise_alert()
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
qdel(src)
|
||||
var/raised_alert = FALSE
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/proc/raise_alert()
|
||||
raised_alert = TRUE
|
||||
var/area/syndicate_depot/depotarea = get_area(src) // Cannot use myArea or areaMaster as neither will be defined for this mob type
|
||||
if(depotarea)
|
||||
depotarea.increase_alert("AI Unit Offline")
|
||||
@@ -45,18 +40,17 @@
|
||||
say("Connection failure!")
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/death(var/pass)
|
||||
if(!raised_alert)
|
||||
raise_alert()
|
||||
. = ..(pass)
|
||||
explode()
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/adjustBruteLoss(var/dmg)
|
||||
health = health - dmg
|
||||
if(health <= 0)
|
||||
explode()
|
||||
. = ..(dmg)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/adjustFireLoss(var/dmg)
|
||||
health = health - dmg
|
||||
if(health <= 0)
|
||||
explode()
|
||||
. = ..(dmg)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/decoy/syndicate/depot/ex_act(var/severity)
|
||||
adjustBruteLoss(250)
|
||||
@@ -1,10 +1,5 @@
|
||||
/mob/living/silicon/decoy/Life(seconds, times_fired)
|
||||
if(src.stat == 2)
|
||||
return
|
||||
else
|
||||
if(src.health <= config.health_threshold_dead && src.stat != 2)
|
||||
death()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/decoy/updatehealth()
|
||||
@@ -13,3 +8,7 @@
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(health <= 0)
|
||||
death()
|
||||
@@ -45,6 +45,7 @@
|
||||
var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible.
|
||||
var/shut_up = 0 //self explanatory :)
|
||||
var/syndicate_aligned = FALSE // Will it only treat operatives?
|
||||
var/drops_parts = TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/tox
|
||||
skin = "tox"
|
||||
@@ -95,6 +96,7 @@
|
||||
/mob/living/simple_animal/bot/medbot/syndicate/emagged
|
||||
emagged = 2
|
||||
declare_crit = 0
|
||||
drops_parts = FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/update_icon()
|
||||
overlays.Cut()
|
||||
@@ -559,36 +561,37 @@
|
||||
visible_message("<span class='userdanger'>[src] blows apart!</span>")
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
switch(skin)
|
||||
if("ointment")
|
||||
new /obj/item/storage/firstaid/fire/empty(Tsec)
|
||||
if("tox")
|
||||
new /obj/item/storage/firstaid/toxin/empty(Tsec)
|
||||
if("o2")
|
||||
new /obj/item/storage/firstaid/o2/empty(Tsec)
|
||||
if("brute")
|
||||
new /obj/item/storage/firstaid/brute/empty(Tsec)
|
||||
if("adv")
|
||||
new /obj/item/storage/firstaid/adv/empty(Tsec)
|
||||
if("bezerk")
|
||||
var/obj/item/storage/firstaid/tactical/empty/T = new(Tsec)
|
||||
T.syndicate_aligned = syndicate_aligned //This is a special case since Syndicate medibots and the mysterious medibot look the same; we also dont' want crew building Syndicate medibots if the mysterious medibot blows up.
|
||||
if("fish")
|
||||
new /obj/item/storage/firstaid/aquatic_kit(Tsec)
|
||||
else
|
||||
new /obj/item/storage/firstaid(Tsec)
|
||||
if(drops_parts)
|
||||
switch(skin)
|
||||
if("ointment")
|
||||
new /obj/item/storage/firstaid/fire/empty(Tsec)
|
||||
if("tox")
|
||||
new /obj/item/storage/firstaid/toxin/empty(Tsec)
|
||||
if("o2")
|
||||
new /obj/item/storage/firstaid/o2/empty(Tsec)
|
||||
if("brute")
|
||||
new /obj/item/storage/firstaid/brute/empty(Tsec)
|
||||
if("adv")
|
||||
new /obj/item/storage/firstaid/adv/empty(Tsec)
|
||||
if("bezerk")
|
||||
var/obj/item/storage/firstaid/tactical/empty/T = new(Tsec)
|
||||
T.syndicate_aligned = syndicate_aligned //This is a special case since Syndicate medibots and the mysterious medibot look the same; we also dont' want crew building Syndicate medibots if the mysterious medibot blows up.
|
||||
if("fish")
|
||||
new /obj/item/storage/firstaid/aquatic_kit(Tsec)
|
||||
else
|
||||
new /obj/item/storage/firstaid(Tsec)
|
||||
|
||||
new /obj/item/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/assembly/prox_sensor(Tsec)
|
||||
|
||||
new /obj/item/healthanalyzer(Tsec)
|
||||
new /obj/item/healthanalyzer(Tsec)
|
||||
|
||||
if(prob(50))
|
||||
new /obj/item/robot_parts/l_arm(Tsec)
|
||||
|
||||
if(reagent_glass)
|
||||
reagent_glass.forceMove(Tsec)
|
||||
reagent_glass = null
|
||||
|
||||
if(prob(50))
|
||||
new /obj/item/robot_parts/l_arm(Tsec)
|
||||
|
||||
if(emagged && prob(25))
|
||||
playsound(loc, 'sound/voice/minsult.ogg', 50, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user