mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
nightmares have objectives now
This commit is contained in:
@@ -82,6 +82,18 @@
|
||||
if(changeling)
|
||||
sList2 += "Chemical Storage: " + "[changeling.chem_charges]/[changeling.chem_storage]"
|
||||
sList2 += "Absorbed DNA: "+ "[changeling.absorbedcount]"
|
||||
var/datum/antagonist/nightmare/nightmare = mind.has_antag_datum(/datum/antagonist/nightmare)
|
||||
if(nightmare)
|
||||
for(var/datum/objective/O in mind.objectives)
|
||||
if(istype(O, /datum/objective/break_lights))
|
||||
var/datum/objective/break_lights/BL = O
|
||||
if(BL.mode) //Keeping lights out of areas
|
||||
var/T = "Target Area(s): "
|
||||
for(var/area/I in BL.area_targets)
|
||||
T += "[initial(I.name)], "
|
||||
sList2 += T
|
||||
else //Break number of lights
|
||||
sList2 += "Lights Broken: " + "[BL.lightsbroken]/[BL.target_amount]"
|
||||
if (sList2 != null)
|
||||
stat(null, "[sList2.Join("\n\n")]")
|
||||
|
||||
|
||||
@@ -183,9 +183,13 @@
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(isopenturf(AM)) //So you can actually melee with it
|
||||
if(isopenturf(AM) && !istype(AM, /turf/open/space) && !istype(AM, /turf/open/lava))
|
||||
var/turf/T = AM
|
||||
if(T.light_power || T.light_range)
|
||||
T.set_light(0,0)
|
||||
else if(isopenturf(AM))
|
||||
return
|
||||
if(isliving(AM))
|
||||
else if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(iscyborg(AM))
|
||||
var/mob/living/silicon/robot/borg = AM
|
||||
@@ -195,19 +199,39 @@
|
||||
else
|
||||
for(var/obj/item/O in AM)
|
||||
if(O.light_range && O.light_power)
|
||||
disintegrate(O)
|
||||
disintegrate(O, user)
|
||||
if(L.pulling && L.pulling.light_range && isitem(L.pulling))
|
||||
disintegrate(L.pulling)
|
||||
disintegrate(L.pulling, user)
|
||||
else if(isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
if(I.light_range && I.light_power)
|
||||
disintegrate(I)
|
||||
disintegrate(I, user)
|
||||
else if(istype(AM, /obj/structure/marker_beacon))
|
||||
var/obj/structure/marker_beacon/I = AM
|
||||
disintegrate(I)
|
||||
disintegrate(I, user)
|
||||
//why the fuck is the marker beacon a structure? who. what. why.
|
||||
else if(istype(AM, /obj/machinery/light))
|
||||
var/obj/machinery/light/L = AM
|
||||
if(L.status == 2) //Assume we just broke the light
|
||||
handle_objectives(user)
|
||||
L.status = 1 //No tube
|
||||
L.update(FALSE)
|
||||
|
||||
/obj/item/light_eater/proc/disintegrate(obj/item/O)
|
||||
/obj/item/light_eater/proc/handle_objectives(mob/living/carbon/human/H)
|
||||
if(!H.mind)
|
||||
return
|
||||
|
||||
if(!H.mind.objectives)
|
||||
return
|
||||
|
||||
for(var/O in H.mind.objectives)
|
||||
if(!istype(O, /datum/objective/break_lights))
|
||||
continue
|
||||
var/datum/objective/break_lights/BL = O
|
||||
if(!BL.mode)
|
||||
BL.lightsbroken++
|
||||
|
||||
/obj/item/light_eater/proc/disintegrate(obj/item/O, user)
|
||||
if(istype(O, /obj/item/pda))
|
||||
var/obj/item/pda/PDA = O
|
||||
PDA.set_light(0)
|
||||
@@ -220,5 +244,8 @@
|
||||
O.burn()
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
|
||||
if(is_species(user, /datum/species/shadow/nightmare))
|
||||
handle_objectives(user)
|
||||
|
||||
#undef HEART_SPECIAL_SHADOWIFY
|
||||
#undef HEART_RESPAWN_THRESHHOLD
|
||||
|
||||
Reference in New Issue
Block a user