From d4dc5ae07010031f4e6b11396c4bf94d01330b36 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Thu, 27 Dec 2012 02:08:41 +0000 Subject: [PATCH] Moved var/force from /obj/item to /obj so that everything gets it, including structures and machines that get tossed around using Telekenesis. The default force is still 0. This should finally put a stop to a large number of runtimes. Runtime fix for being hit by something without there being a usr. This was most likely due to explosions or possibly mass drivers. Runtime fix for simple animals using department channels. Only parrots can use them now as they are the only simple animal with the 'ears' variable. Runtime fix for the mech's energy relay process() when there is no battery in the mech. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5405 316c924e-a436-60f5-8080-3fe189b3f50e --- code/ATMOSPHERICS/pipes.dm | 2 +- code/game/mecha/combat/combat.dm | 2 +- code/game/mecha/equipment/tools/tools.dm | 2 +- code/game/objects/items.dm | 1 - code/game/objects/objs.dm | 2 ++ code/modules/mob/living/living_defense.dm | 2 +- code/modules/mob/living/say.dm | 4 +-- code/modules/power/singularity/singularity.dm | 3 ++ tgstation.dme | 33 +++++++++++++++++++ 9 files changed, 44 insertions(+), 7 deletions(-) diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index af8fd1ac79..8e00cfbe83 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -4,7 +4,7 @@ obj/machinery/atmospherics/pipe var/datum/pipeline/parent var/volume = 0 - var/force = 20 + force = 20 layer = 2.4 //under wires with their 2.44 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 6c8ea5effc..e836d387d1 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -1,5 +1,5 @@ /obj/mecha/combat - var/force = 30 + force = 30 var/damtype = "brute" var/melee_cooldown = 10 var/melee_can_hit = 1 diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 1ced2080dc..b93ef78c7d 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -792,7 +792,7 @@ ER.set_ready_state(1) return var/cur_charge = ER.chassis.get_charge() - if(isnull(cur_charge)) + if(isnull(cur_charge) || !ER.chassis.cell) stop() ER.set_ready_state(1) ER.occupant_message("No powercell detected.") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 457a0f4400..c322cf2aa5 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -3,7 +3,6 @@ icon = 'icons/obj/items.dmi' var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/abstract = 0 - var/force = 0 var/item_state = null var/damtype = "brute" var/r_speed = 1.0 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 5df86fd955..19e9918c2d 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -12,6 +12,8 @@ var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! + var/force = 0 + /obj/proc/process() processing_objects.Remove(src) return 0 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3fd157c230..29e0c6f773 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -68,7 +68,7 @@ if(!O.fingerprintslast) return var/client/assailant = directory[ckey(O.fingerprintslast)] - if(assailant.mob && istype(assailant.mob,/mob)) + if(assailant && assailant.mob && istype(assailant.mob,/mob)) var/mob/M = assailant.mob src.attack_log += text("\[[time_stamp()]\] Has been hit with [O], last touched by [M.name] ([assailant.ckey])") M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with [O]") diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index b1dff1b4f9..2120be8858 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -130,9 +130,9 @@ var/list/department_radio_keys = list( //world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]" if (message_mode) message = trim(copytext(message, 3)) - if (!(ishuman(src) || isanimal(src) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels)))) + if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels)))) message_mode = null //only humans can use headsets - // Check removed so parrots can use headsets! + // Check changed so that parrots can use headsets. Other simple animals do not have ears and will cause runtimes. // And borgs -Sieve if (!message) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d335c20cf8..a54627232a 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -419,6 +419,9 @@ var/global/list/uneatable = list( /obj/machinery/singularity/proc/mezzer() for(var/mob/living/carbon/M in oviewers(8, src)) + if(istype(M, /mob/living/carbon/brain)) //Ignore brains + continue + if(M.stat == CONSCIOUS) if(istype(M:glasses,/obj/item/clothing/glasses/meson)) M << "\blue You look directly into The [src.name], good thing you had your protective eyewear on!" diff --git a/tgstation.dme b/tgstation.dme index 1cf752a58d..01db0027ea 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6,6 +6,39 @@ // BEGIN_FILE_DIR #define FILE_DIR . +#define FILE_DIR "html" +#define FILE_DIR "icons" +#define FILE_DIR "icons/effects" +#define FILE_DIR "icons/mecha" +#define FILE_DIR "icons/misc" +#define FILE_DIR "icons/mob" +#define FILE_DIR "icons/obj" +#define FILE_DIR "icons/obj/assemblies" +#define FILE_DIR "icons/obj/atmospherics" +#define FILE_DIR "icons/obj/clothing" +#define FILE_DIR "icons/obj/doors" +#define FILE_DIR "icons/obj/flora" +#define FILE_DIR "icons/obj/machines" +#define FILE_DIR "icons/obj/pipes" +#define FILE_DIR "icons/pda_icons" +#define FILE_DIR "icons/spideros_icons" +#define FILE_DIR "icons/Testing" +#define FILE_DIR "icons/turf" +#define FILE_DIR "icons/vending_icons" +#define FILE_DIR "maps" +#define FILE_DIR "sound" +#define FILE_DIR "sound/AI" +#define FILE_DIR "sound/ambience" +#define FILE_DIR "sound/effects" +#define FILE_DIR "sound/hallucinations" +#define FILE_DIR "sound/items" +#define FILE_DIR "sound/machines" +#define FILE_DIR "sound/mecha" +#define FILE_DIR "sound/misc" +#define FILE_DIR "sound/piano" +#define FILE_DIR "sound/violin" +#define FILE_DIR "sound/voice" +#define FILE_DIR "sound/weapons" // END_FILE_DIR // BEGIN_PREFERENCES