diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm index ab19b0e525c..3989e7d8804 100644 --- a/code/WorkInProgress/surgery.dm +++ b/code/WorkInProgress/surgery.dm @@ -308,6 +308,9 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/fix_vein required_tool = /obj/item/weapon/FixOVein + min_duration = 70 + max_duration = 90 + can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -855,7 +858,8 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) target.cores-- user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \ "\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.") - new/obj/item/metroid_core(target.loc) + if(target.cores >= 0) + new/obj/item/metroid_core(target.loc) if(target.cores <= 0) target.icon_state = "baby roro dead-nocore" diff --git a/code/WorkInProgress/virus2/dishincubator.dm b/code/WorkInProgress/virus2/dishincubator.dm index e6d0da12394..f2aefe07ead 100644 --- a/code/WorkInProgress/virus2/dishincubator.dm +++ b/code/WorkInProgress/virus2/dishincubator.dm @@ -165,5 +165,5 @@ if(beaker) if(!beaker.reagents.remove_reagent("virusfood",5)) foodsupply += 10 - if(!beaker.reagents.remove_reagent("toxins",1)) + if(!beaker.reagents.remove_reagent("toxin",1)) toxins += 1 \ No newline at end of file diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm index da3c60bf304..acac9585819 100644 --- a/code/datums/organs/organ_external.dm +++ b/code/datums/organs/organ_external.dm @@ -188,7 +188,9 @@ if(W.internal && !W.is_treated()) // internal wounds get worse over time W.open_wound(0.1 * wound_update_accuracy) - owner.vessel.remove_reagent("blood",0.2 * W.damage * wound_update_accuracy) + owner.vessel.remove_reagent("blood",0.07 * W.damage * wound_update_accuracy) + if(prob(1 * wound_update_accuracy)) + owner.custom_pain("You feel a stabbing pain in your [display_name]!",1) if(W.bandaged || W.salved) // slow healing @@ -489,9 +491,11 @@ W = new wound_type(damage) // Possibly trigger an internal wound, too. - if(damage > 10 && prob(damage) && type != BURN) + var/local_damage = brute_dam + burn_dam + damage + if(damage > 10 && type != BURN && local_damage > 20 && prob(damage)) var/datum/wound/internal_bleeding/I = new (15) wounds += I + owner.custom_pain("You feel something rip in your [display_name]!", 1) // check whether we can add the wound to an existing wound for(var/datum/wound/other in wounds) diff --git a/code/game/dna.dm b/code/game/dna.dm index 80a250620f0..c6b27658158 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -116,9 +116,10 @@ uni_identity = temp var/mutstring = "" - for(var/i = 1, i <= 13, i++) + for(var/i = 1, i <= STRUCDNASIZE, i++) mutstring += add_zero2(num2hex(rand(1,1024)),3) + struc_enzymes = mutstring unique_enzymes = md5(character.real_name) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 8dce6c6e441..fbdc336282d 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -300,7 +300,8 @@ var/global/datum/controller/gameticker/ticker emergency_shuttle.process() - if(!mode.explosion_in_progress && mode.check_finished()) + var/mode_finished = mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1) + if(!mode.explosion_in_progress && mode_finished) current_state = GAME_STATE_FINISHED spawn diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 37f1a721aae..2ea34728e9e 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -499,7 +499,7 @@ // hack for alt titles if(istype(loc, /mob)) var/mob/M = loc - if(M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs()) + if(M.mind && M.mind.role_alt_title == jobName && M.mind.assigned_role in get_all_jobs()) return M.mind.assigned_role if(istype(src, /obj/item/device/pda)) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 5e6f6e9d1fc..3bb0f83bad9 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -235,6 +235,9 @@ else dat += text("[]\tHealth %: [] ([])
", (occupant.health > 50 ? "" : ""), occupant.health, t1) + if(occupant.virus2) + dat += text("Viral pathogen detected in blood stream.
") + dat += text("[]\t-Brute Damage %: []

", (occupant.getBruteLoss() < 60 ? "" : ""), occupant.getBruteLoss()) dat += text("[]\t-Respiratory Damage %: []
", (occupant.getOxyLoss() < 60 ? "" : ""), occupant.getOxyLoss()) dat += text("[]\t-Toxin Content %: []
", (occupant.getToxLoss() < 60 ? "" : ""), occupant.getToxLoss()) diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 4fa8f095fe0..f43b43ac07d 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -820,14 +820,14 @@ Auto Patrol: []"}, projectile = /obj/item/projectile/energy/electrode else if(lasercolor == "b") if (src.emagged == 2) - projectile = /obj/item/projectile/beam/omnitag + projectile = /obj/item/projectile/beam/lastertag/omni else - projectile = /obj/item/projectile/beam/bluetag + projectile = /obj/item/projectile/beam/lastertag/blue else if(lasercolor == "r") if (src.emagged == 2) - projectile = /obj/item/projectile/beam/omnitag + projectile = /obj/item/projectile/beam/lastertag/omni else - projectile = /obj/item/projectile/beam/redtag + projectile = /obj/item/projectile/beam/lastertag/red if (!( istype(U, /turf) )) return @@ -1011,7 +1011,7 @@ Auto Patrol: []"}, /obj/machinery/bot/ed209/bullet_act(var/obj/item/projectile/Proj) if((src.lasercolor == "b") && (src.disabled == 0)) - if(istype(Proj, /obj/item/projectile/beam/redtag)) + if(istype(Proj, /obj/item/projectile/beam/lastertag/red)) src.disabled = 1 del (Proj) sleep(100) @@ -1019,7 +1019,7 @@ Auto Patrol: []"}, else ..() else if((src.lasercolor == "r") && (src.disabled == 0)) - if(istype(Proj, /obj/item/projectile/beam/bluetag)) + if(istype(Proj, /obj/item/projectile/beam/lastertag/blue)) src.disabled = 1 del (Proj) sleep(100) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index cba4e84c484..4370b1044f5 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -133,7 +133,7 @@ return 0 - src.heal_level = rand(75,100) //Randomizes what health the clone is when ejected + src.heal_level = rand(0,40) //Randomizes what health the clone is when ejected src.attempting = 1 //One at a time!! src.locked = 1 diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 7be13d3d1e3..a16b545c196 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -76,8 +76,8 @@ // All energy-based weapons are applicable switch(E.type) if(/obj/item/weapon/gun/energy/laser/bluetag) - projectile = /obj/item/projectile/beam/bluetag - eprojectile = /obj/item/projectile/beam/omnitag//This bolt will stun ERRYONE with a vest + projectile = /obj/item/projectile/beam/lastertag/blue + eprojectile = /obj/item/projectile/beam/lastertag/omni//This bolt will stun ERRYONE with a vest iconholder = null reqpower = 100 lasercolor = "b" @@ -90,8 +90,8 @@ shot_delay = 30 if(/obj/item/weapon/gun/energy/laser/redtag) - projectile = /obj/item/projectile/beam/redtag - eprojectile = /obj/item/projectile/beam/omnitag + projectile = /obj/item/projectile/beam/lastertag/red + eprojectile = /obj/item/projectile/beam/lastertag/omni iconholder = null reqpower = 100 lasercolor = "r" @@ -375,13 +375,13 @@ Status: []
"}, if (src.health <= 0) src.die() // the death process :( if((src.lasercolor == "b") && (src.disabled == 0)) - if(istype(Proj, /obj/item/projectile/beam/redtag)) + if(istype(Proj, /obj/item/projectile/beam/lastertag/red)) src.disabled = 1 del (Proj) sleep(100) src.disabled = 0 if((src.lasercolor == "r") && (src.disabled == 0)) - if(istype(Proj, /obj/item/projectile/beam/bluetag)) + if(istype(Proj, /obj/item/projectile/beam/lastertag/blue)) src.disabled = 1 del (Proj) sleep(100) diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 990b823ef15..ae5dd51891d 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -221,9 +221,9 @@ if(4) A = new /obj/item/projectile/change( loc ) if(5) - A = new /obj/item/projectile/beam/bluetag( loc ) + A = new /obj/item/projectile/beam/lastertag/blue( loc ) if(6) - A = new /obj/item/projectile/beam/redtag( loc ) + A = new /obj/item/projectile/beam/lastertag/red( loc ) A.original = target.loc use_power(500) else diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2793ce28d80..55b2be019e9 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -158,6 +158,10 @@ MASS SPECTROMETER if(e.status & ORGAN_BROKEN) user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1) break + for(var/datum/organ/external/e in H.organs) + for(var/datum/wound/W in e.wounds) if(W.internal) + user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1) + break if(M:vessel) var/blood_volume = round(M:vessel.get_reagent_amount("blood")) var/blood_percent = blood_volume / 560 diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index e98c28e7dc4..555dbe1caea 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -124,8 +124,8 @@ usr << "You can't clear the memory while playing or recording!" return else - storedinfo -= storedinfo - timestamp -= timestamp + if(storedinfo) storedinfo.Cut() + if(timestamp) timestamp.Cut() timerecorded = 0 usr << "Memory cleared." return diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index b91b5a560d3..2ab6bbc9caf 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -86,13 +86,12 @@ else H.Stun(time) if(H.stat != 2) H.stat = 1 - for(var/mob/O in viewers(H, null)) - O.show_message(text("\red [] has been knocked unconscious!", H), 1, "\red You hear someone fall.", 2) + user.visible_message("\red [H] has been knocked unconscious!", "\red You knock [H] unconscious!") + return else - H << text("\red [] tried to knock you unconscious!",user) + H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!") H.eye_blurry += 3 - - return + return ..() /* * Trays - Agouri diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 5d67a68caca..6cba41021be 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -589,7 +589,7 @@ - + @@ -607,7 +607,7 @@ - + diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index f567abc87e0..8175482402c 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -25,7 +25,7 @@ for (var/client/C in admin_list) if (src.holder.rank == "Admin Observer") C << "ADMIN: [key_name(usr, C)]: [msg]" - else if(C.holder.level != 0) + else if(C.holder && C.holder.level != 0) C << "ADMIN: [key_name(usr, C)] (JMP): [msg]" /client/proc/cmd_mod_say(msg as text) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 3e373c7d5f2..543586dba46 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -249,16 +249,16 @@ BLIND // can't see anything H.holstered = usr.get_active_hand() usr.drop_item() H.holstered.loc = src - usr.visible_message("\blue [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].") + usr.visible_message("\blue \The [usr] holsters \the [H.holstered].", "You holster \the [H.holstered].") else if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) usr << "\red You need an empty hand to draw the gun!" else if(usr.a_intent == "hurt") - usr.visible_message("\red [usr] draws \the [H.holstered], ready to shoot!", \ + usr.visible_message("\red \The [usr] draws \the [H.holstered], ready to shoot!", \ "\red You draw \the [H.holstered], ready to shoot!") else - usr.visible_message("\blue [usr] draws \the [H.holstered], pointing it at the ground.", \ - "\blue You draw \the [H.holstered], pointing it at tthe ground.") + usr.visible_message("\blue \The [usr] draws \the [H.holstered], pointing it at the ground.", \ + "\blue You draw \the [H.holstered], pointing it at the ground.") usr.put_in_hands(H.holstered) H.holstered = null diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index edb8ff7decb..2fd220b170b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -418,8 +418,8 @@ if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]" //NOTE: the alerts dont reset when youre out of danger. dont blame me, //blame the person who coded them. Temporary fix added. - - client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) + if (client) + client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) if ((blinded)) @@ -441,7 +441,7 @@ if (!( machine.check_eye(src) )) reset_view(null) else - if(!client.adminobs) + if(client && !client.adminobs) reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 612b0bb6f8b..d24be56a049 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -332,9 +332,8 @@ FUCK YOU MORE FAT CODE -Hawk*/ if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]" //NOTE: the alerts dont reset when youre out of danger. dont blame me, //blame the person who coded them. Temporary fix added. - - - client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) + if (client) + client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) if ((blinded)) @@ -356,7 +355,7 @@ FUCK YOU MORE FAT CODE -Hawk*/ if (!( machine.check_eye(src) )) reset_view(null) else - if(!client.adminobs) + if(client && !client.adminobs) reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index cf5ee8ce95c..9da4b432274 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -242,8 +242,8 @@ healths.icon_state = "health7" if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]" - - client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) + if (client) + client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) if ((blinded)) @@ -265,7 +265,7 @@ if (!( machine.check_eye(src) )) reset_view(null) else - if(!client.adminobs) + if(client && !client.adminobs) reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index d3519e65cae..614715275e9 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -461,6 +461,7 @@ The else statement is for equipping stuff to empty slots. It can still be worn/put on as normal. */ /obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn + target.cpr_time = 1 if(!source || !target) return //Target or source no longer exist if(source.loc != s_loc) return //source has moved if(target.loc != t_loc) return //target has moved @@ -549,7 +550,6 @@ It can still be worn/put on as normal. O.show_message("\red [source] performs CPR on [target]!", 1) target << "\blue You feel a breath of fresh air enter your lungs. It feels good." source << "\red Repeat at least every 7 seconds." - target.cpr_time = 1 if("dnainjector") var/obj/item/weapon/dnainjector/S = item if(S) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 45cca8c29f2..161e21d4781 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -187,6 +187,10 @@ var/word = pick("dizzy","woosey","faint") src << "\red You feel extremely [word]" if(0 to 122) + // There currently is a strange bug here. If the mob is not below -100 health + // when death() is called, apparently they will be just fine, and this way it'll + // spam deathgasp. Adjusting toxloss ensures the mob will stay dead. + toxloss += 300 // just to be safe! death() @@ -489,7 +493,7 @@ domutcheck(src,null) emote("gasp") updatehealth() - + if(damage && organs.len) var/datum/organ/external/O = pick(organs) if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage) @@ -499,6 +503,7 @@ if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return var/lung_ruptured = is_lung_ruptured() + if(lung_ruptured && prob(2)) spawn emote("me", 1, "coughs up blood!") src.drip(10) @@ -527,7 +532,7 @@ if(!breath) if(isobj(loc)) var/obj/location_as_object = loc - breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME) + breath = location_as_object.handle_internal_lifeform(src, BREATH_MOLES) else if(isturf(loc)) var/breath_moles = 0 /*if(environment.return_pressure() > ONE_ATMOSPHERE) @@ -538,6 +543,13 @@ breath_moles = environment.total_moles()*BREATH_PERCENTAGE breath = loc.remove_air(breath_moles) + + + if(!lung_ruptured) + if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5) + if(prob(5)) + rupture_lung() + // Handle chem smoke effect -- Doohl var/block = 0 if(wear_mask) @@ -713,9 +725,6 @@ apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) - if(oxyloss >= 50 && prob(oxyloss / 5)) - rupture_lung() - //Temporary fixes to the alerts. return 1 @@ -1480,7 +1489,7 @@ if((mRemote in mutations) && remoteview_target) if(remoteview_target.stat==CONSCIOUS) isRemoteObserve = 1 - if(!isRemoteObserve && !client.adminobs) + if(!isRemoteObserve && client && !client.adminobs) remoteview_target = null reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 307d97b7b61..35be674639c 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -551,7 +551,7 @@ if (!( machine.check_eye(src) )) reset_view(null) else - if(!client.adminobs) + if(client && !client.adminobs) reset_view(null) return 1 diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 0476926c32c..326bf4dd663 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -25,7 +25,7 @@ dna = new /datum/dna( null ) dna.real_name = real_name dna.uni_identity = "00600200A00E0110148FC01300B009" - dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" + dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" dna.unique_enzymes = md5(name) //////////blah var/gendervar diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index a25a631a937..7c272660503 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -1,6 +1,7 @@ /mob/living/Logout() ..() - if(!key && mind) //key and mind have become seperated. - mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. - if(!immune_to_ssd && sleeping < 2 && mind.active) - sleeping = 2 + if (mind) + if(!key) //key and mind have become seperated. + mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. + if(!immune_to_ssd && sleeping < 2 && mind.active) + sleeping = 2 diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index 1eb1d159c9a..34d01953679 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -195,10 +195,13 @@ m_type = 2 if("law") - message = "[src] shows its legal authorization barcode." + if (istype(module,/obj/item/weapon/robot_module/security)) + message = "[src] shows its legal authorization barcode." - playsound(src.loc, 'biamthelaw.ogg', 50, 0) - m_type = 2 + playsound(src.loc, 'biamthelaw.ogg', 50, 0) + m_type = 2 + else + src << "You are not THE LAW, pal." else src << text("Invalid Emote: []", act) if ((message && src.stat == 0)) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 77e9e64d65c..aa308f90835 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -255,7 +255,7 @@ if (!( src.machine.check_eye(src) )) src.reset_view(null) else - if(!client.adminobs) + if(client && !client.adminobs) reset_view(null) return 1 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 16fa20c5de5..c007425c9b8 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -226,7 +226,7 @@ /obj/item/weapon/paper/Topic(href, href_list) ..() - if((usr.stat || usr.restrained())) + if(!usr || (usr.stat || usr.restrained())) return if(href_list["write"]) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 63f9f9ab3d9..a0f320873ac 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -61,7 +61,7 @@ /obj/machinery/power/smes/proc/chargedisplay() - return round(5.5*charge/capacity) + return round(5.5*charge/(capacity ? capacity : 5e6)) #define SMESRATE 0.05 // rate of internal charge to external power diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index b6afa3fbcd4..d769acf00b2 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -90,7 +90,7 @@ obj/item/weapon/gun/energy/laser/retro name = "laser tag gun" icon_state = "bluetag" desc = "Standard issue weapon of the Imperial Guard" - projectile_type = "/obj/item/projectile/beam/bluetag" + projectile_type = "/obj/item/projectile/beam/lastertag/blue" origin_tech = "combat=1;magnets=2" clumsy_check = 0 var/charge_tick = 0 @@ -127,7 +127,7 @@ obj/item/weapon/gun/energy/laser/retro name = "laser tag gun" icon_state = "redtag" desc = "Standard issue weapon of the Imperial Guard" - projectile_type = "/obj/item/projectile/beam/redtag" + projectile_type = "/obj/item/projectile/beam/lastertag/red" origin_tech = "combat=1;magnets=2" clumsy_check = 0 var/charge_tick = 0 diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 8f2d39bf9de..924a8a7f20f 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -111,7 +111,7 @@ var/list/beam_master = list() -/obj/item/projectile/beam/bluetag +/obj/item/projectile/beam/lastertag/blue name = "lasertag beam" icon_state = "bluelaser" pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE @@ -126,7 +126,7 @@ var/list/beam_master = list() M.Weaken(5) return 1 -/obj/item/projectile/beam/redtag +/obj/item/projectile/beam/lastertag/red name = "lasertag beam" icon_state = "laser" pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE @@ -141,7 +141,7 @@ var/list/beam_master = list() M.Weaken(5) return 1 -/obj/item/projectile/beam/omnitag//A laser tag bolt that stuns EVERYONE +/obj/item/projectile/beam/lastertag/omni//A laser tag bolt that stuns EVERYONE name = "lasertag beam" icon_state = "omnilaser" pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 6887a35b08d..63dba43d518 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -145,7 +145,8 @@ bullet_act(var/obj/item/projectile/Proj) if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) - explode() + if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) + explode() blob_act() explode() diff --git a/code/modules/research/xenoarchaeology/artifact.dm b/code/modules/research/xenoarchaeology/artifact.dm index 06a3c9a6e92..53edfb54a07 100644 --- a/code/modules/research/xenoarchaeology/artifact.dm +++ b/code/modules/research/xenoarchaeology/artifact.dm @@ -153,8 +153,6 @@ if(istype(P,/obj/item/projectile/beam)) src.Artifact_Activate() else if(istype(P,/obj/item/projectile/ion)) src.Artifact_Activate() else if(istype(P,/obj/item/projectile/energy)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/beam/bluetag)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/beam/redtag)) src.Artifact_Activate() if (my_effect.trigger == "heat") if(istype(P,/obj/item/projectile/temp)) src.Artifact_Activate() diff --git a/code/modules/research/xenoarchaeology/artifact_analysis.dm b/code/modules/research/xenoarchaeology/artifact_analysis.dm index 1a83768937b..5225b650e7f 100644 --- a/code/modules/research/xenoarchaeology/artifact_analysis.dm +++ b/code/modules/research/xenoarchaeology/artifact_analysis.dm @@ -221,7 +221,7 @@ findarti++ cur_artifact = A if (findarti == 1) - if(cur_artifact.being_used) + if(cur_artifact && cur_artifact.being_used) var/message = "[src] states, \"Cannot analyse. Excess energy drain is disrupting signal.\"" src.visible_message(message, message) else diff --git a/code/setup.dm b/code/setup.dm index 3837273bd45..39a9b4b06fd 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -20,7 +20,8 @@ #define MIN_PLASMA_DAMAGE 20 #define BREATH_VOLUME 0.5 //liters in a normal breath -#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME +#define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME /(T20C*R_IDEAL_GAS_EQUATION)) +#define BREATH_PERCENTAGE BREATH_MOLES/MOLES_CELLSTANDARD //Amount of air to take a from a tile #define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 //Amount of air needed before pass out/suffocation commences diff --git a/code/world.dm b/code/world.dm index b73100d519f..af1b8e32c02 100644 --- a/code/world.dm +++ b/code/world.dm @@ -18,8 +18,8 @@ src.load_mode() src.load_motd() - src.load_mods() src.load_admins() + src.load_mods() investigate_reset() if (config.usewhitelist) load_whitelist() @@ -147,6 +147,8 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")] if(revdata) s["revision"] = revdata.revision s["admins"] = admins + s["end"] = "end" + return list2params(s)