mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Adminbus fixing final part: goodbye Isolated
This commit is contained in:
@@ -43,7 +43,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||
/mob/living/carbon/human/pl_effects()
|
||||
//Handles all the bad things plasma can do.
|
||||
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
//Contamination
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define CLEAN_BOT 4 // Cleanbots
|
||||
#define MED_BOT 5 // Medibots
|
||||
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
|
||||
var/isolated = 0
|
||||
|
||||
/obj/machinery/bot/proc/turn_on()
|
||||
if(stat) return 0
|
||||
@@ -59,7 +58,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
src.health -= rand(15,30)*brute_dam_coeff
|
||||
src.visible_message("\red <B>[user] has slashed [src]!</B>")
|
||||
@@ -70,7 +69,7 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(M.melee_damage_upper == 0) return
|
||||
src.health -= M.melee_damage_upper
|
||||
@@ -95,7 +94,7 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!locked)
|
||||
@@ -125,27 +124,27 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
|
||||
/obj/machinery/bot/meteorhit()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
src.explode()
|
||||
return
|
||||
|
||||
/obj/machinery/bot/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
src.health -= rand(20,40)*fire_dam_coeff
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/machinery/bot/ex_act(severity)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -165,7 +164,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/bot/emp_act(severity)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
var/was_on = on
|
||||
stat |= EMPED
|
||||
@@ -259,7 +258,7 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/cultify()
|
||||
if(src.isolated)
|
||||
if(src.flags & INVULNERABLE)
|
||||
return
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
@@ -208,21 +208,21 @@
|
||||
switch(bumpers)
|
||||
if(1)
|
||||
for(var/mob/living/L in S)
|
||||
if(L.isolated)
|
||||
if(L.flags & INVULNERABLE)
|
||||
continue
|
||||
if(passengers.len < MAX_CAPACITY)
|
||||
capture_mob(L)
|
||||
else
|
||||
buckled_mob << "<span class='warning'>There is no place in the bus for any additional passenger.</span>"
|
||||
for(var/obj/machinery/bot/B in S)
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
continue
|
||||
if(passengers.len < MAX_CAPACITY)
|
||||
capture_mob(B)
|
||||
if(2)
|
||||
var/hit_sound = list('sound/weapons/genhit1.ogg','sound/weapons/genhit2.ogg','sound/weapons/genhit3.ogg')
|
||||
for(var/mob/living/L in S)
|
||||
if(L.isolated)
|
||||
if(L.flags & INVULNERABLE)
|
||||
continue
|
||||
L.take_overall_damage(5,0)
|
||||
if(L.buckled)
|
||||
@@ -233,12 +233,12 @@
|
||||
playsound(src, pick(hit_sound), 50, 0, 0)
|
||||
if(3)
|
||||
for(var/mob/living/L in S)
|
||||
if(L.isolated)
|
||||
if(L.flags & INVULNERABLE)
|
||||
continue
|
||||
L.gib()
|
||||
playsound(src, 'sound/weapons/bloodyslice.ogg', 50, 0, 0)
|
||||
for(var/obj/machinery/bot/B in S)
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
continue
|
||||
B.explode()
|
||||
|
||||
@@ -285,10 +285,10 @@
|
||||
var/mob/living/M = A
|
||||
if(M.faction == "adminbus mob")
|
||||
return
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
return
|
||||
M.captured = 1
|
||||
M.isolated = 1
|
||||
M.flags |= INVULNERABLE
|
||||
M.loc = src.loc
|
||||
M.dir = src.dir
|
||||
M.update_canmove()
|
||||
@@ -301,10 +301,10 @@
|
||||
src.add_fingerprint(M)
|
||||
else if(isbot(A))
|
||||
var/obj/machinery/bot/B = A
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
return
|
||||
B.turn_off()
|
||||
B.isolated = 1
|
||||
B.flags |= INVULNERABLE
|
||||
B.anchored = 1
|
||||
B.loc = src.loc
|
||||
B.dir = src.dir
|
||||
@@ -339,7 +339,7 @@
|
||||
user.loc = loc
|
||||
user.dir = dir
|
||||
user.update_canmove()
|
||||
user.isolated = 1
|
||||
user.flags |= INVULNERABLE
|
||||
buckled_mob = user
|
||||
update_mob()
|
||||
add_fingerprint(user)
|
||||
@@ -386,7 +386,7 @@
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob.isolated = 0
|
||||
buckled_mob.flags &= ~INVULNERABLE
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob = null
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/obj/machinery/bot/B = A
|
||||
B.loc = get_step(src,turn(src.dir,-90))
|
||||
B.turn_on()
|
||||
B.isolated = 0
|
||||
B.flags &= ~INVULNERABLE
|
||||
B.anchored = 0
|
||||
passengers -= B
|
||||
update_rearview()
|
||||
@@ -32,7 +32,7 @@
|
||||
L.loc = get_step(src,turn(src.dir,-90))
|
||||
L.buckled = null
|
||||
L.anchored = 0
|
||||
L.isolated = 0
|
||||
L.flags &= ~INVULNERABLE
|
||||
L.captured = 0
|
||||
L.pixel_x = 0
|
||||
L.pixel_y = 0
|
||||
@@ -579,7 +579,7 @@
|
||||
var/obj/machinery/bot/B = A
|
||||
B.loc = get_step(src,turn(src.dir,-90))
|
||||
B.turn_on()
|
||||
B.isolated = 0
|
||||
B.flags &= ~INVULNERABLE
|
||||
B.anchored = 0
|
||||
passengers -= B
|
||||
B.loc = pick(tdomeobserve)
|
||||
@@ -788,7 +788,7 @@
|
||||
var/obj/machinery/bot/B = A
|
||||
B.loc = get_step(src,turn(src.dir,-90))
|
||||
B.turn_on()
|
||||
B.isolated = 0
|
||||
B.flags &= ~INVULNERABLE
|
||||
B.anchored = 0
|
||||
passengers -= B
|
||||
|
||||
@@ -921,10 +921,11 @@
|
||||
|
||||
/obj/structure/stool/bed/chair/vehicle/adminbus/proc/Adminbus_Deletion(mob/bususer)//make sure to always use this proc when deleting an adminbus
|
||||
|
||||
bususer.gui_icons.adminbus_delete.icon_state = "icon_delete-push"
|
||||
if(alert(bususer, "This will free all passengers, remove any spawned mobs/laserguns/bombs, [singulo ? "free the captured singularity" : ""], and remove all the entities associated with the bus(chains, roadlights, jukebox,...) Are you sure?", "Adminbus Deletion", "Yes", "No") != "Yes")
|
||||
bususer.gui_icons.adminbus_delete.icon_state = "icon_delete"
|
||||
return
|
||||
if(bususer)
|
||||
bususer.gui_icons.adminbus_delete.icon_state = "icon_delete-push"
|
||||
if(alert(bususer, "This will free all passengers, remove any spawned mobs/laserguns/bombs, [singulo ? "free the captured singularity" : ""], and remove all the entities associated with the bus(chains, roadlights, jukebox,...) Are you sure?", "Adminbus Deletion", "Yes", "No") != "Yes")
|
||||
bususer.gui_icons.adminbus_delete.icon_state = "icon_delete"
|
||||
return
|
||||
|
||||
for(var/i=passengers.len;i>0;i--)
|
||||
var/atom/A = passengers[i]
|
||||
@@ -943,7 +944,7 @@
|
||||
if(EAST)
|
||||
B.y = y-1
|
||||
B.turn_on()
|
||||
B.isolated = 0
|
||||
B.flags &= ~INVULNERABLE
|
||||
B.anchored = 0
|
||||
passengers -= B
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/editappear,
|
||||
/client/proc/commandname,
|
||||
/client/proc/delete_all_adminbus,
|
||||
/client/proc/gib_money // /vg/
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
@@ -156,6 +157,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/disable_bloodvirii, // /vg/
|
||||
/client/proc/configFood,
|
||||
/client/proc/debug_reagents,
|
||||
/client/proc/make_invulnerable,
|
||||
#ifdef PROFILE_MACHINES
|
||||
/client/proc/cmd_admin_dump_macprofile,
|
||||
#endif
|
||||
|
||||
@@ -1175,3 +1175,35 @@ var/global/blood_virus_spreading_disabled = 0
|
||||
log_admin("[key_name(src)] has cluwne-ified [M.key].")
|
||||
else
|
||||
alert("Invalid mob, needs to be a human.")
|
||||
|
||||
client/proc/make_invulnerable(var/mob/M in mob_list)
|
||||
set name = "Toggle Invulnerability"
|
||||
set desc = "Make the target atom invulnerable to all form of damage."
|
||||
set category = "Fun"
|
||||
|
||||
var/isinvuln = 0
|
||||
if(M.flags & INVULNERABLE)
|
||||
isinvuln = 1
|
||||
|
||||
switch(isinvuln)
|
||||
if(0)
|
||||
if(alert(usr, "Make the target atom invulnerable to all form of damage?", "Toggle Invulnerability", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.flags |= INVULNERABLE
|
||||
if(1)
|
||||
if(alert(usr, "Make the target atom vulnerable again?", "Toggle Invulnerability", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.flags &= ~INVULNERABLE
|
||||
|
||||
client/proc/delete_all_adminbus()
|
||||
set name = "Delete every Adminbus"
|
||||
set desc = "When the world cannot handle them anymore."
|
||||
set category = "Fun"
|
||||
|
||||
if(alert(usr, "Delete every single Adminbus in the game world?", "Delete Adminbus", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/structure/stool/bed/chair/vehicle/adminbus/AB in world)
|
||||
AB.Adminbus_Deletion()
|
||||
@@ -83,7 +83,7 @@
|
||||
adjustFireLoss(-heal_rate)
|
||||
adjustOxyLoss(-heal_rate)
|
||||
|
||||
if(!environment || isolated)
|
||||
if(!environment || (flags & INVULNERABLE))
|
||||
return
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
|
||||
|
||||
/mob/living/carbon/alien/humanoid/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(wear_suit) wear_suit.emp_act(severity)
|
||||
@@ -72,8 +71,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -111,7 +109,7 @@
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat == 2)
|
||||
return
|
||||
@@ -132,7 +130,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE) || isolated)
|
||||
if((status_flags & GODMODE) || (flags & INVULNERABLE))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
|
||||
@@ -68,8 +68,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -107,7 +106,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat == 2)
|
||||
return
|
||||
@@ -135,7 +134,7 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/meteorhit(O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE) || isolated)
|
||||
if((status_flags & GODMODE) || (flags & INVULNERABLE))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/mob/living/carbon/brain/
|
||||
proc/handle_mutations_and_radiation()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if (radiation)
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment || isolated)
|
||||
if(!environment || (flags & INVULNERABLE))
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
@@ -271,8 +271,7 @@
|
||||
|
||||
|
||||
/*/mob/living/carbon/brain/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
stat("Spacepod Integrity", "[!S.health ? "0" : "[(S.health / initial(S.health)) * 100]"]%")
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
return
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
return
|
||||
@@ -315,7 +315,7 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/meteorhit(O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
|
||||
@@ -131,8 +131,7 @@ emp_act
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
for(var/obj/O in src)
|
||||
@@ -277,8 +276,7 @@ emp_act
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -374,7 +372,7 @@ emp_act
|
||||
|
||||
|
||||
/mob/living/carbon/human/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(stat == 2) return
|
||||
show_message("\red The blob attacks you!")
|
||||
@@ -384,7 +382,7 @@ emp_act
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/meteorhit(O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
|
||||
@@ -441,7 +441,7 @@ var/global/list/organ_damage_overlays = list(
|
||||
adjustCloneLoss(0.1)
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(getFireLoss())
|
||||
if((M_RESIST_HEAT in mutations) || (prob(1)))
|
||||
@@ -511,7 +511,7 @@ var/global/list/organ_damage_overlays = list(
|
||||
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
|
||||
|
||||
proc/breathe()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(M_NO_BREATH in mutations) return // No breath mutation means no breathing.
|
||||
@@ -636,7 +636,7 @@ var/global/list/organ_damage_overlays = list(
|
||||
return health <= config.health_threshold_crit && stat != 2
|
||||
|
||||
proc/handle_breath(var/datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE) || isolated)
|
||||
if((status_flags & GODMODE) || (flags & INVULNERABLE))
|
||||
return 0
|
||||
|
||||
if(!breath || (breath.total_moles() == 0) || suiciding)
|
||||
@@ -661,7 +661,7 @@ var/global/list/organ_damage_overlays = list(
|
||||
return species.handle_breath(breath, src)
|
||||
|
||||
proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment || isolated)
|
||||
if(!environment || (flags & INVULNERABLE))
|
||||
return
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
//world << "AI proc ended."
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!environment)
|
||||
|
||||
@@ -211,16 +211,14 @@
|
||||
|
||||
|
||||
/mob/living/carbon/slime/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
powerlevel = 0 // oh no, the power!
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
|
||||
@@ -254,7 +252,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/slime/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat == 2)
|
||||
return
|
||||
@@ -285,7 +283,7 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/meteorhit(O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
@@ -223,7 +223,7 @@
|
||||
return
|
||||
|
||||
proc/breathe()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(reagents)
|
||||
@@ -298,7 +298,7 @@
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE) || isolated)
|
||||
if((status_flags & GODMODE) || (flags & INVULNERABLE))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
@@ -403,7 +403,7 @@
|
||||
return 1
|
||||
|
||||
proc/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment || isolated)
|
||||
if(!environment || (flags & INVULNERABLE))
|
||||
return
|
||||
var/environment_heat_capacity = environment.heat_capacity()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/meteorhit(obj/O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
@@ -601,16 +601,14 @@
|
||||
/mob/living/carbon/monkey/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/monkey/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(wear_id) wear_id.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -636,7 +634,7 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat != 2)
|
||||
adjustFireLoss(60)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/mob/living/Life()
|
||||
..()
|
||||
if (isolated)
|
||||
if (flags & INVULNERABLE)
|
||||
bodytemperature = initial(bodytemperature)
|
||||
if (monkeyizing) return
|
||||
if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE
|
||||
@@ -71,7 +71,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
else if(!isolated)
|
||||
else if(!(flags & INVULNERABLE))
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
// now with silicons
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
return
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
// damage ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/take_organ_damage(var/brute, var/burn)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(isolated) return 0
|
||||
if(flags & INVULNERABLE) return 0
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
@@ -314,7 +314,7 @@
|
||||
// damage MANY external organs, in random order
|
||||
/mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(isolated) return 0
|
||||
if(flags & INVULNERABLE) return 0
|
||||
adjustBruteLoss(brute)
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return absorb
|
||||
|
||||
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(istype(AM,/obj/))
|
||||
var/obj/O = AM
|
||||
@@ -155,7 +155,7 @@
|
||||
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
|
||||
|
||||
/mob/living/proc/handle_fire()
|
||||
if(isolated && on_fire)
|
||||
if((flags & INVULNERABLE) && on_fire)
|
||||
extinguish()
|
||||
if(fire_stacks < 0)
|
||||
fire_stacks++ //If we've doused ourselves in water to avoid fire, dry off slowly
|
||||
|
||||
@@ -284,7 +284,7 @@ var/list/ai_list = list()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
@@ -296,8 +296,7 @@ var/list/ai_list = list()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if (prob(30))
|
||||
@@ -309,8 +308,7 @@ var/list/ai_list = list()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -409,7 +407,7 @@ var/list/ai_list = list()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/meteorhit(obj/O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (src.stat != 2)
|
||||
src.adjustBruteLoss(60)
|
||||
@@ -113,8 +113,7 @@
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/pai/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
// Silence for 2 minutes
|
||||
@@ -148,8 +147,7 @@
|
||||
src << "<font color=green>You feel an electric surge run through your circuitry and become acutely aware at how lucky you are that you can still feel at all.</font>"
|
||||
|
||||
/mob/living/silicon/pai/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(!blinded)
|
||||
@@ -174,7 +172,7 @@
|
||||
// See software.dm for Topic()
|
||||
|
||||
/mob/living/silicon/pai/meteorhit(obj/O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
src << "\red You enable [C.name]."
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if (stat != 2)
|
||||
adjustBruteLoss(60)
|
||||
@@ -530,7 +530,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/ex_act(severity)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
return
|
||||
|
||||
@@ -556,7 +556,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/meteorhit(obj/O as obj)
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [src] has been hit by [O]"), 1)
|
||||
|
||||
@@ -104,8 +104,7 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
GiveTarget(new_target)
|
||||
|
||||
if(HOSTILE_STANCE_ATTACK)
|
||||
if(!isolated)
|
||||
if(!(flags & INVULNERABLE))
|
||||
MoveToTarget()
|
||||
DestroySurroundings()
|
||||
|
||||
if(HOSTILE_STANCE_ATTACKING)
|
||||
if(!isolated)
|
||||
if(!(flags & INVULNERABLE))
|
||||
AttackTarget()
|
||||
DestroySurroundings()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
var/mob/living/L = the_target
|
||||
if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive == 1)
|
||||
return 0
|
||||
if(L.isolated)
|
||||
if(L.flags & INVULNERABLE)
|
||||
return 0
|
||||
if(L.faction == src.faction && !attack_same || L.faction != src.faction && attack_same == 2 || L.faction != attack_faction && attack_faction)
|
||||
return 0
|
||||
|
||||
@@ -99,8 +99,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
switch(severity)
|
||||
|
||||
@@ -152,8 +152,7 @@
|
||||
|
||||
//ion rifle!
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/emp_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the EMP."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
health -= rand(3,15) * (severity + 1)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
purge -= 1
|
||||
|
||||
//Movement
|
||||
if((!client||deny_client_move) && !stop_automated_movement && wander && !anchored && (ckey == null) && !isolated)
|
||||
if((!client||deny_client_move) && !stop_automated_movement && wander && !anchored && (ckey == null) && !(flags & INVULNERABLE))
|
||||
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
|
||||
//Atmos
|
||||
if(isolated)
|
||||
if(flags & INVULNERABLE)
|
||||
return 1
|
||||
|
||||
var/atmos_suitable = 1
|
||||
@@ -480,8 +480,7 @@
|
||||
Die()
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
if(isolated)
|
||||
src << "The bus' robustness protects you from the explosion."
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -1231,7 +1231,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
var/old_x = pixel_x
|
||||
var/old_y = pixel_y
|
||||
is_jittery = 1
|
||||
while((jitteriness > 100) && !isolated)
|
||||
while((jitteriness > 100) && !(flags & INVULNERABLE))
|
||||
// var/amplitude = jitteriness*(sin(jitteriness * 0.044 * world.time) + 1) / 70
|
||||
// pixel_x = amplitude * sin(0.008 * jitteriness * world.time)
|
||||
// pixel_y = amplitude * cos(0.008 * jitteriness * world.time)
|
||||
|
||||
@@ -254,8 +254,6 @@
|
||||
var/deny_client_move = 0
|
||||
var/incorporeal_move = 0
|
||||
|
||||
var/isolated = 0//for when inside something like the Adminbus. So they completely ignore the external pressure/temperature/pressure/gases etc
|
||||
|
||||
//Keeps track of where the mob was spawned. Mostly for teleportation purposes. and no, using initial() doesn't work.
|
||||
var/origin_x = 0
|
||||
var/origin_y = 0
|
||||
|
||||
@@ -69,7 +69,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
/obj/machinery/singularity/narsie/mezzer()
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
continue
|
||||
if(!iscultist(M))
|
||||
M << "<span class='danger'> You feel your sanity crumble away in an instant as you gaze upon [src.name]...</span>"
|
||||
@@ -158,7 +158,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
if (istype(A, /mob/) && (get_dist(A, src) <= 7))
|
||||
var/mob/M = A
|
||||
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
return 0
|
||||
|
||||
M.cultify()
|
||||
@@ -198,7 +198,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
if (istype(A, /mob/living/))
|
||||
var/mob/living/C2 = A
|
||||
|
||||
if(C2.isolated)
|
||||
if(C2.flags & INVULNERABLE)
|
||||
return 0
|
||||
|
||||
C2.dust() // Changed from gib(), just for less lag.
|
||||
@@ -206,7 +206,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
else if (istype(A, /obj/))
|
||||
if (isbot(A))
|
||||
var/obj/machinery/bot/B = A
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
return
|
||||
A.ex_act(1)
|
||||
|
||||
@@ -245,7 +245,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
if (istype(A, /mob/living/))
|
||||
var/mob/living/C2 = A
|
||||
|
||||
if(C2.isolated)
|
||||
if(C2.flags & INVULNERABLE)
|
||||
return 0
|
||||
|
||||
C2.dust() // Changed from gib(), just for less lag.
|
||||
@@ -253,7 +253,7 @@ var/global/narsie_behaviour = "CultStation13"
|
||||
else if (istype(A, /obj/))
|
||||
if (isbot(A))
|
||||
var/obj/machinery/bot/B = A
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
return
|
||||
A.ex_act(1)
|
||||
|
||||
@@ -424,7 +424,7 @@ var/global/mr_clean_targets = list(
|
||||
/obj/machinery/singularity/narsie/large/clean/mezzer()
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
continue
|
||||
M << "<span class='warning'> You take a moment to admire [src.name] hard at work...</span>"
|
||||
M.apply_effect(3, STUN)
|
||||
@@ -446,7 +446,7 @@ var/global/mr_clean_targets = list(
|
||||
if (istype(A, /mob/living/))
|
||||
|
||||
var/mob/living/L = A
|
||||
if(L.isolated)
|
||||
if(L.flags & INVULNERABLE)
|
||||
return 0
|
||||
|
||||
if (isrobot(L))
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
if (istype(A, /mob/living)) // Mobs get gibbed.
|
||||
var/mob/living/M = A
|
||||
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
return 0
|
||||
|
||||
gain = 20
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
if (isbot(A))
|
||||
var/obj/machinery/bot/B = A
|
||||
if(B.isolated)
|
||||
if(B.flags & INVULNERABLE)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/machinery/power/supermatter))//NOW YOU REALLY FUCKED UP
|
||||
@@ -520,7 +520,7 @@
|
||||
radiation = round(((src.energy-150)/50)*5,1)
|
||||
radiationmin = round((radiation/5),1)//
|
||||
for(var/mob/living/M in view(toxrange, src.loc))
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
continue
|
||||
M.apply_effect(rand(radiationmin,radiation), IRRADIATE)
|
||||
toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad")))
|
||||
@@ -532,7 +532,7 @@
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
if(istype(M, /mob/living/carbon/brain)) //Ignore brains
|
||||
continue
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
continue
|
||||
if(M.stat == CONSCIOUS)
|
||||
if (istype(M,/mob/living/carbon/human))
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return 1
|
||||
if(isanimal(target)) return 0
|
||||
var/mob/living/L = target
|
||||
if(L.isolated) return 0
|
||||
if(L.flags & INVULNERABLE) return 0
|
||||
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, agony, blocked) // add in AGONY!
|
||||
return 1
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
if(M.isolated)
|
||||
if(M.flags & INVULNERABLE)
|
||||
return 0
|
||||
M.bodytemperature = temperature
|
||||
if(temperature > 500)//emagged
|
||||
|
||||
@@ -220,6 +220,8 @@ var/MAX_EXPLOSION_RANGE = 14
|
||||
#define BLOCKHEADHAIR 4 // temporarily removes the user's hair overlay. Leaves facial hair.
|
||||
#define BLOCKHAIR 32768 // temporarily removes the user's hair, facial and otherwise.
|
||||
|
||||
#define INVULNERABLE 128
|
||||
|
||||
//flags for pass_flags
|
||||
#define PASSTABLE 1
|
||||
#define PASSGLASS 2
|
||||
|
||||
Reference in New Issue
Block a user