diff --git a/code/ZAS/Plasma.dm b/code/ZAS/Plasma.dm index 48f1800842a..638edf1031f 100644 --- a/code/ZAS/Plasma.dm +++ b/code/ZAS/Plasma.dm @@ -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 diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index e4fa68eacb8..8b020e5b69a 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -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 [user] has slashed [src]!") @@ -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) diff --git a/code/game/objects/structures/vehicles/adminbus.dm b/code/game/objects/structures/vehicles/adminbus.dm index 622b2e2164e..4e750b5d9ef 100644 --- a/code/game/objects/structures/vehicles/adminbus.dm +++ b/code/game/objects/structures/vehicles/adminbus.dm @@ -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 << "There is no place in the bus for any additional passenger." 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 diff --git a/code/game/objects/structures/vehicles/adminbus_powers.dm b/code/game/objects/structures/vehicles/adminbus_powers.dm index 96b211dc240..008ca50ad68 100644 --- a/code/game/objects/structures/vehicles/adminbus_powers.dm +++ b/code/game/objects/structures/vehicles/adminbus_powers.dm @@ -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 diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 31a7a1b2e0f..3659ef9c93d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -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 diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index b92e435ff5d..01e5bed8711 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -1174,4 +1174,36 @@ var/global/blood_virus_spreading_disabled = 0 feedback_add_details("admin_verb","MKCLU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(src)] has cluwne-ified [M.key].") else - alert("Invalid mob, needs to be a human.") \ No newline at end of file + 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() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 08308d24ba4..9dfd26c1582 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 3a6c8cdd345..0302025a88d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -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 ))) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 234b4c5a9e5..96f211fce47 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index b33a16a88db..4c009a8e1c2 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -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 ))) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 5c03d7366ba..21731fe8714 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 02d4c79a71a..2045eafdc18 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -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))) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 80ffabca4fd..189cd802508 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 ))) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 7bb33cef2a4..b7b2861d310 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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 ))) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 80886ebc602..8a1bf7865e5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 98f9bb97c95..4716cc88b75 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -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) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index ef85e690789..b6ed4885d9b 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -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 ))) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 6c5a429a20e..f097ba4f7dd 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 761068ddf24..e846158c069 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -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) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index faa1ce0bb21..dc413f311d9 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 99c9fc91c11..95cec117551 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -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 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 6bf8daa7fc8..98ef54e0daa 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -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) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 1264236468b..e531cac36ba 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -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 << "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." /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) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ba05d0bced2..adeb8f793fe 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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) @@ -1444,4 +1444,4 @@ return 0 /mob/living/silicon/robot/get_inactive_hand(var/obj/item/W) - return 0 + return 0 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 3e5c6be0842..992dafa0210 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f7e89a0bb6b..64312fe1e3b 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index d42f85c183c..07dda94c9b9 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 271e8f89193..0afb425a689 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 5342535f54c..ce3581ce793 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -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 ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0d50f76908f..af076dd9fb6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 12101247896..6717382bd38 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -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 diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index a721f74c0fe..820dc1e4249 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -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 << " You feel your sanity crumble away in an instant as you gaze upon [src.name]..." @@ -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 << " You take a moment to admire [src.name] hard at work..." 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)) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 0adfc67a3bc..c456c1fca0d 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -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)) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 56e010ee30e..c9eaf738cee 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -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 diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index f9ed2e94cc2..cfa3cb8b4fe 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -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 diff --git a/code/setup.dm b/code/setup.dm index 6988e40ab61..9c8e3a0e1dd 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -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