mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Containment fields can no longer contain megafauna
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
|
||||
#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork))
|
||||
|
||||
#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna))
|
||||
|
||||
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
||||
|
||||
#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
if (istype(M, /atom/movable))
|
||||
if(istype(M, /mob/living/simple_animal/hostile/megafauna))
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) has teleported through [src].")
|
||||
do_teleport(M, target, precision) ///You will appear adjacent to the beacon
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!target)
|
||||
return 0
|
||||
|
||||
if(istype (target, /mob/living/simple_animal/hostile/megafauna))
|
||||
if(ismegafauna(target))
|
||||
src << "<span class='warning'>This creature is too powerful for you to possess!</span>"
|
||||
return 0
|
||||
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
minbodytemp = 0
|
||||
maxbodytemp = INFINITY
|
||||
environment_target_typecache = list(
|
||||
/obj/machinery/door/window,
|
||||
/obj/structure/window,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/table,
|
||||
/obj/structure/grille,
|
||||
/obj/structure/rack,
|
||||
/obj/structure/barricade,
|
||||
/obj/machinery/field)
|
||||
var/medal_type = MEDAL_PREFIX
|
||||
var/score_type = BOSS_SCORE
|
||||
var/elimination = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/obj/machinery/field/containment
|
||||
name = "Containment Field"
|
||||
name = "containment field"
|
||||
desc = "An energy field."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
icon_state = "Contain_F"
|
||||
@@ -34,6 +34,16 @@
|
||||
/obj/machinery/field/containment/ex_act(severity, target)
|
||||
return 0
|
||||
|
||||
/obj/machinery/field/containment/attack_animal(mob/living/simple_animal/M)
|
||||
if(!FG1 || !FG2)
|
||||
qdel(src)
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
M.visible_message("<span class='warning'>[M] glows fiercely as the containment field flickers out!</span>")
|
||||
FG1.calc_power(INFINITY) //rip that 'containment' field
|
||||
M.adjustHealth(-M.obj_damage)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/field/containment/Crossed(mob/mover)
|
||||
if(isliving(mover))
|
||||
|
||||
@@ -23,7 +23,7 @@ field_generator power level display
|
||||
#define FG_ONLINE 2
|
||||
|
||||
/obj/machinery/field/generator
|
||||
name = "Field Generator"
|
||||
name = "field generator"
|
||||
desc = "A large thermal battery that projects a high amount of energy when powered."
|
||||
icon = 'icons/obj/machines/field_generator.dmi'
|
||||
icon_state = "Field_Gen"
|
||||
@@ -133,6 +133,15 @@ field_generator power level display
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.environment_smash >= 3 && active == FG_OFFLINE && state != FG_UNSECURED)
|
||||
state = FG_UNSECURED
|
||||
anchored = FALSE
|
||||
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
|
||||
else
|
||||
..()
|
||||
if(!anchored)
|
||||
step(src, get_dir(M, src))
|
||||
|
||||
/obj/machinery/field/generator/emp_act()
|
||||
return 0
|
||||
@@ -182,8 +191,10 @@ field_generator power level display
|
||||
start_fields()
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/calc_power()
|
||||
/obj/machinery/field/generator/proc/calc_power(set_power_draw)
|
||||
var/power_draw = 2 + fields.len
|
||||
if(set_power_draw)
|
||||
power_draw = set_power_draw
|
||||
|
||||
if(draw_power(round(power_draw/2,1)))
|
||||
check_power_level()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(H.stat)
|
||||
visible_message("<span class='warning'>Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs.</span>")
|
||||
playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1)
|
||||
if(istype(H,/mob/living/simple_animal/hostile/megafauna/dragon))
|
||||
if(ismegafauna(H))
|
||||
meat_counter += 20
|
||||
else
|
||||
meat_counter ++
|
||||
|
||||
@@ -35,7 +35,7 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
user << "<span class='warning'>They are too far away!</span>"
|
||||
return
|
||||
|
||||
if(istype(target, /mob/living/simple_animal/hostile/megafauna))
|
||||
if(ismegafauna(target))
|
||||
user << "<span class='warning'>This creature is too powerful to control!</span>"
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user