diff --git a/code/game/dna.dm b/code/game/dna.dm index 64da7a7de90..288623edf9d 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -365,8 +365,9 @@ del(animation) var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) - O.dna = M.dna - M.dna = null + if (M.dna) + O.dna = M.dna + M.dna = null for(var/obj/T in M) del(T) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 4ca002ff07b..cd27984e45f 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,4 +1,5 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range) + if(!epicenter) return spawn(0) message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index d7f21403898..1c1169f0569 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -19,14 +19,15 @@ target.overlays += image('assemblies.dmi', "plastic-explosive2") user << "Bomb has been planted. Timer counting down from [src.timer]." spawn(src.timer*10) - explosion(location, -1, -1, 2, 3) - if (istype(src.target, /turf/simulated/wall)) src.target:dismantle_wall(1) - else src.target.ex_act(1) - if (isobj(src.target)) - if (src.target) - del(src.target) - if (src) - del(src) + if(target) + explosion(location, -1, -1, 2, 3) + if (istype(src.target, /turf/simulated/wall)) src.target:dismantle_wall(1) + else src.target.ex_act(1) + if (isobj(src.target)) + if (src.target) + del(src.target) + if (src) + del(src) /obj/item/weapon/plastique/attack(mob/M as mob, mob/user as mob, def_zone) return \ No newline at end of file diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 5afc7bb3c22..2814c6133a4 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -738,10 +738,12 @@ if (user.l_hand == src) user.l_hand = R R.layer = 20 - src.part1.loc = R - src.part2.loc = R - src.part1.master = R - src.part2.master = R + if(src.part1) + src.part1.loc = R + src.part1.master = R + if(src.part2) + src.part2.loc = R + src.part2.master = R var/turf/T = src.loc if (!( istype(T, /turf) )) T = T.loc @@ -762,9 +764,10 @@ message_admins("[key_name_admin(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]") user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) else - src.status = 0 - bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." + if(src) + src.status = 0 + bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" + user << "\blue The hole has been closed." src.part2.status = src.status src.add_fingerprint(user) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 434105e2277..76d0d1de812 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -560,18 +560,18 @@ var/showadminmessages = 1 if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(M)]!", 1) - if (ticker.mode.name == "AI malfunction") - var/obj/O = locate("landmark*ai") - M << "\blue You have been teleported to your new starting location!" - M.loc = O.loc - M.buckled = null - else - var/obj/S = locate(text("start*AI")) - if ((istype(S, /obj/landmark/start) && istype(S.loc, /turf))) - M << "\blue You have been teleported to your new starting location!" - M.loc = S.loc - M.buckled = null - world << "[M.real_name] is the AI!" +// if (ticker.mode.name == "AI malfunction") +// var/obj/O = locate("landmark*ai") +// M << "\blue You have been teleported to your new starting location!" +// M.loc = O.loc +// M.buckled = null +// else +// var/obj/S = locate(text("start*AI")) +// if ((istype(S, /obj/landmark/start) && istype(S.loc, /turf))) +// M << "\blue You have been teleported to your new starting location!" +// M.loc = S.loc +// M.buckled = null + // world << "[M.real_name] is the AI!" log_admin("[key_name(usr)] AIized [key_name(M)]") H.AIize() else @@ -1131,6 +1131,7 @@ var/showadminmessages = 1 if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space)) turfs += T for(var/turf/T in world) + set background = 1 if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor)) spawn(50+rand(0,3000)) picked = pick(turfs) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 7a6b6e28149..e7fde63070d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -63,6 +63,7 @@ src.verbs += /obj/admins/proc/startnow //start now bitch // Debug + src.verbs += /client/proc/restartcontroller //exactly what it sounds like src.verbs += /client/proc/atmosscan //for locating piping breaks src.verbs += /client/proc/debug_variables src.verbs += /client/proc/cmd_modify_object_variables @@ -190,6 +191,7 @@ src.verbs += /obj/admins/proc/startnow //start now bitch // Debug + src.verbs += /client/proc/restartcontroller //exactly what it sounds like src.verbs += /client/proc/atmosscan //for locating piping breaks src.verbs += /client/proc/debug_variables src.verbs += /client/proc/cmd_modify_object_variables diff --git a/code/modules/admin/verbs/MC.dm b/code/modules/admin/verbs/MC.dm new file mode 100644 index 00000000000..346f98cbecf --- /dev/null +++ b/code/modules/admin/verbs/MC.dm @@ -0,0 +1,5 @@ +/client/proc/restartcontroller() + set category = "Debug" + set name = "Restart Master Controller" + + master_controller.process() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 797db55cb26..4047e8590e3 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -4,9 +4,9 @@ var/cancel if (src.healths) src.healths.icon_state = "health5" - - for(var/mob/O in viewers(src, null)) - O.show_message("The [src.name] lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist + if(!gibbed) + for(var/mob/O in viewers(src, null)) + O.show_message("The [src.name] lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist src.stat = 2 src.canmove = 0 diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 0d3dbfaeee0..90a05d41695 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -171,6 +171,8 @@ if(src.reagents.has_reagent("lexorin")) return + if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite + var/datum/gas_mixture/environment = loc.return_air() var/datum/air_group/breath diff --git a/tgstation.dme b/tgstation.dme index 8e99a0861a6..af6514e92da 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -608,6 +608,7 @@ #include "code\modules\admin\verbs\diagnostics.dm" #include "code\modules\admin\verbs\grillify.dm" #include "code\modules\admin\verbs\massmodvar.dm" +#include "code\modules\admin\verbs\MC.dm" #include "code\modules\admin\verbs\modifyvariables.dm" #include "code\modules\admin\verbs\onlyone.dm" #include "code\modules\admin\verbs\playsound.dm"