From 6300e859a2cc34967c0bd37fa780e8245ed438cb Mon Sep 17 00:00:00 2001 From: Jarcolr Date: Mon, 17 Mar 2014 23:13:29 +0200 Subject: [PATCH 01/23] Fixes #4600 Will fix #4600 and the problem with drinks not knowing when they are open/closed. Hopefully I didn't miss a string of code again,I don't think so,though. --- .../reagents/reagent_containers/food/cans.dm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index ec9f457b67c..2d8698b19b3 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -11,7 +11,7 @@ attack(mob/M as mob, mob/user as mob, def_zone) if (canopened == 0) - user << " You need to open the drink!" + user << "You need to open the drink!" return var/datum/reagents/R = src.reagents var/fillevel = gulp_size @@ -26,11 +26,18 @@ reagents.reaction(M, INGEST) spawn(5) reagents.trans_to(M, gulp_size) + else if (canopened == 0) + user << "You need to open the drink!" + return playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) return 1 else if( istype(M, /mob/living/carbon/human) ) + if (canopened == 0) + user << " You need to open the drink!" + return + else if (canopened == 1) for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] attempts to feed [M] [src].", 1) if(!do_mob(user, M)) return @@ -72,8 +79,10 @@ user << "\red [src] is full." return - var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) - user << "\blue You fill [src] with [trans] units of the contents of [target]." + var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) + user << "\blue You fill [src] with [trans] units of the contents of [target]." + if (canopened == 0) + user << "You need to open the drink!" else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. if(!reagents.total_volume) @@ -263,4 +272,4 @@ icon_state = "sodawater" New() ..() - reagents.add_reagent("sodawater", 50) \ No newline at end of file + reagents.add_reagent("sodawater", 50) From b6768b0af011764486aa06d3504c79ad5b01e360 Mon Sep 17 00:00:00 2001 From: Jarcolr Date: Tue, 18 Mar 2014 18:30:08 +0200 Subject: [PATCH 02/23] Telescopic robuster no longer has the stun It's about time somebody did this. It still has the really really annoying/bad brute damage, but it doesn't just knock you on your ass in one hit anymore. --- code/game/objects/items/weapons/swords_axes_etc.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index bbfb940ec9c..3e679259947 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -113,7 +113,7 @@ //Telescopic baton /obj/item/weapon/melee/telebaton name = "telescopic baton" - desc = "A compact yet robust personal defense weapon. Can be concealed when folded." + desc = "A compact yet rebalanced personal defense weapon. Can be concealed when folded." icon = 'icons/obj/weapons.dmi' icon_state = "telebaton_0" item_state = "telebaton_0" @@ -178,7 +178,6 @@ return if(..()) playsound(src.loc, "swing_hit", 50, 1, -1) - target.Weaken(4) return else return ..() From de8628043422bafd00b57ea5aad942bc75f0d514 Mon Sep 17 00:00:00 2001 From: Aryn Date: Thu, 20 Mar 2014 04:48:08 -0600 Subject: [PATCH 03/23] Ctrl-H "faggot" to "meatball" and one icon state change. --- .../Cael_Aislinn/Jungle/jungle_temple.dm | 2 +- code/game/machinery/kitchen/processor.dm | 8 +++--- .../items/weapons/grenades/spawnergrenade.dm | 2 +- code/modules/food/recipes_microwave.dm | 26 +++++++++--------- code/modules/mob/living/carbon/human/life.dm | 12 ++++---- code/modules/reagents/Chemistry-Recipes.dm | 2 +- .../reagent_containers/food/snacks.dm | 12 ++++---- icons/obj/food.dmi | Bin 92119 -> 92113 bytes 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm index 20009c0a64b..3581c9fff66 100644 --- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm +++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm @@ -210,7 +210,7 @@ /obj/item/weapon/reagent_containers/food/snacks/candiedapple, \ /obj/item/weapon/reagent_containers/food/snacks/chocolatebar, \ /obj/item/weapon/reagent_containers/food/snacks/cookie, \ - /obj/item/weapon/reagent_containers/food/snacks/faggot, \ + /obj/item/weapon/reagent_containers/food/snacks/meatball, \ /obj/item/weapon/reagent_containers/food/snacks/plump_pie, \ ) for(var/i=0,i", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#")) + say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that meatball traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#")) if(2) say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!")) if(3) @@ -1587,7 +1587,7 @@ else if(status_flags & XENO_HOST) holder.icon_state = "hudxeno" holder2.icon_state = "hudxeno" - else if(foundVirus) + else if(foundVirus) holder.icon_state = "hudill" else if(has_brain_worms()) var/mob/living/simple_animal/borer/B = has_brain_worms() @@ -1628,7 +1628,7 @@ var/obj/item/weapon/card/id/I = wear_id.GetID() if(I) perpname = I.registered_name - + for(var/datum/data/record/E in data_core.general) if(E.fields["name"] == perpname) for (var/datum/data/record/R in data_core.security) @@ -1649,7 +1649,7 @@ if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD) var/image/holder1 = hud_list[IMPTRACK_HUD] var/image/holder2 = hud_list[IMPLOYAL_HUD] - var/image/holder3 = hud_list[IMPCHEM_HUD] + var/image/holder3 = hud_list[IMPCHEM_HUD] holder1.icon_state = "hudblank" holder2.icon_state = "hudblank" @@ -1672,7 +1672,7 @@ var/image/holder = hud_list[SPECIALROLE_HUD] holder.icon_state = "hudblank" if(mind) - + switch(mind.special_role) if("traitor","Syndicate") holder.icon_state = "hudsyndicate" @@ -1690,7 +1690,7 @@ holder.icon_state = "huddeathsquad" if("Ninja") holder.icon_state = "hudninja" - + hud_list[SPECIALROLE_HUD] = holder hud_updateflag = 0 diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 06ebdc6c9ae..8e8fb917105 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -851,7 +851,7 @@ datum var/list/flashers = list() for(var/mob/living/carbon/human/M in viewers(TO, null)) if(M:eyecheck() <= 0) - flick("e_flash", M.flash) // flash dose faggots + flick("e_flash", M.flash) flashers += M var/y_distance = TO.y - FROM.y diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 0a1f2fbafcd..3e99d56b258 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -670,10 +670,10 @@ reagents.add_reagent("nutriment", 3) src.bitesize = 6 -/obj/item/weapon/reagent_containers/food/snacks/faggot - name = "Faggot" - desc = "A great meal all round. Not a cord of wood." - icon_state = "faggot" +/obj/item/weapon/reagent_containers/food/snacks/meatball + name = "meatball" + desc = "A great meal all round." + icon_state = "meatball" filling_color = "#DB0000" New() @@ -2837,7 +2837,7 @@ /obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob) // Bun + meatball = burger - if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/faggot)) + if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meatball)) new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src) user << "You make a burger." del(W) @@ -2908,7 +2908,7 @@ ..() reagents.add_reagent("nutriment", 2) -/obj/item/weapon/reagent_containers/food/snacks/rawfaggot +/obj/item/weapon/reagent_containers/food/snacks/rawmeatball name = "raw meatball" desc = "A raw meatball." icon = 'icons/obj/food_ingredients.dmi' diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index 54610e3fe68bc435d84bcefbfd0d1eb0a01a039c..4866a35ec03433056ed82aff2ab6194646db3450 100644 GIT binary patch delta 1479 zcmV;&1vvWG&jr!X1&}0vp?XwUbVOxyV{&P5bZKvH004NLm72?L9XAYy*FH~il5Cs8 zxioDT-n0pdph)rv2ONnrqDK-1T|A!i^j(bS*i8`VH@vZdPaI03s9&UC9sm0D&*!hl zk6%6??l>3Gc)U5j|MmKCwTP|mcyoOB_HgA`CRevVN~Oxjo8!xWg~riyd3m_9lFRYt z_~vjmW(vIhe&LF)o?|^tnK^c8H?%x)?s7vWi6Cn=w)&=v-GZFe*y>x*T%QX}bs+D% zpmCD=%WWvywf|9#Gq0u%Jm~#1=p|En2Hr)pf_pf6ZGDQT31MERmXq&$$J6wB@C^eq zTZq$4al%Zl?7c335Q?2Ho~GBCBo3g}AffN6)i@_LGgs{B40`_oCa=5XB5@iiPR2E4 zPJ`b626FvWuyOq}zH#qB?mg-s>R^AlH|}?k`vc_uL?_bU}Q54RX)+f&=%DdRwR&Aj8Ff^9rOFrxmj|b2Y9d_5D2j zfOffi@OG-1fIGL1qx5rh(G{C-AzzE5nR5w~tdG1f_ebiGXDG~uS zn8@&{E)r(}rnp8cCqpx!Gu6u-s~|dxxd@+}#+fsys7^+6fA5UfrK3u(ylVPxR2wK7 z%7C(xz+gy!8pmAN(A-~TuVmQ{G_y@wsVbyd6R>|8*mJFY5HV&P=e#0h@+1+Ox}lu4 zLg+n5Md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BRtx_x#C^g4C*3?TmRdFXChp?B@ZIXu{Ve)23uCXjLmBodQ z*fhz*4p4?FF0`jNb-%k12SBHdE9{X62vfhCpH&)l{C)7 zPw0?)0B|>FmQf#pR zwO}R3M_Xe#MZm&|caLE7M1=}r?1?6sFehxY zMj$(!9kvE$FhTIj9w^gI=5g6M#}?+85>O#$rZJ>{V#WnR_dUV`1dFFjlwkM+7kLH# zB37^kb8Kkez+~d$}Uzc zZ!|;lV~vlGlu4Js8jW7d<7uqM$H%ew3keGDEvQHag}k2_@4oxr-?KQ%RHD%xr}UK?@W*FKKioWvxVgSkUSsk9 zJ56<~%JzulU`gJEm?H8%z`)F86Q$GysQe3?C5F&7wg7>bJ%#9roQzXXO+D8mQj}Yw4pN3iQ&u;RsZuk4 zI=cWV+3-uI$>s$pf?B18&Bj;E4o(siFb=rfNU(h4m3@;9OU`|vapt5vskBJ02|Pk_&zI2qS~ zp)b5wn&_)6lVR_@J5FhX6VM%}w1FFc*DAM`Xq;CrF2hidrdz!~VIaLaFxBV<_I zs5b)IK<5rmS&)8m-kPy)kauT|>=8wC1ZFu)kY;G_qvv{x1!}imP_(Lh+AFYsHySwQ zDK^(5(8k*HCE{HdXr+>S3*)PIVm3(VZ-4*&$CuA<-nwf@oY^VhXa^JUu&IPy51pxzMMxxLL From 5dbc141b9ba6bdcfbb23616b9fa0951121166a1b Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Thu, 20 Mar 2014 20:15:02 -0500 Subject: [PATCH 04/23] IPC examination won't cause "OH NO ROBOTIC LIMBS" (no shit, yo!) messages. Unless they are damaged. --- code/modules/mob/living/carbon/human/examine.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 4efcb8de24f..9cc0e22dfc8 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -258,8 +258,9 @@ continue if(temp.status & ORGAN_ROBOT) if(!(temp.brute_dam + temp.burn_dam)) - wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name]!\n" - continue + if(!species.flags & IS_SYNTHETIC) + wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name]!\n" + continue else wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name], it has" if(temp.brute_dam) switch(temp.brute_dam) @@ -274,7 +275,8 @@ wound_flavor_text["[temp.display_name]"] += " some burns" if(21 to INFINITY) wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting") - wound_flavor_text["[temp.display_name]"] += "!\n" + if(wound_flavor_text["[temp.display_name]"]) + wound_flavor_text["[temp.display_name]"] += "!\n" else if(temp.wounds.len > 0) var/list/wound_descriptors = list() for(var/datum/wound/W in temp.wounds) @@ -469,4 +471,4 @@ else return 0 else - return 0 \ No newline at end of file + return 0 From 731f08eb10ee978ed98285cfd358d476aefc5e7d Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Thu, 20 Mar 2014 20:31:33 -0500 Subject: [PATCH 05/23] Rejuvination verb fix for IPC's limbs don't suddenly become organic. --- code/modules/mob/living/carbon/human/human_damage.dm | 5 +++-- code/modules/organs/organ_external.dm | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 39964670139..623ea112b4a 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -192,8 +192,9 @@ This function restores the subjects blood to max. */ /mob/living/carbon/human/proc/restore_blood() - var/blood_volume = vessel.get_reagent_amount("blood") - vessel.add_reagent("blood",560.0-blood_volume) + if(!species.flags & NO_BLOOD) + var/blood_volume = vessel.get_reagent_amount("blood") + vessel.add_reagent("blood",560.0-blood_volume) /* diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 8ba5c0939a9..27d8db993fd 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -198,7 +198,10 @@ This function completely restores a damaged organ to perfect condition. */ /datum/organ/external/proc/rejuvenate() damage_state = "00" - status = 0 + if(status & 128) //Robotic organs stay robotic. Fix because right click rejuvinate makes IPC's organs organic. + status = 128 + else + status = 0 perma_injury = 0 brute_dam = 0 burn_dam = 0 From 37a4b9e7da3a6e9e061a0ffa909663b3b4c69473 Mon Sep 17 00:00:00 2001 From: LightningIron Date: Fri, 21 Mar 2014 15:24:19 -0500 Subject: [PATCH 06/23] Added Alden-Saraspova counters to excavation closets; item previously unobtainable. --- code/modules/research/xenoarchaeology/misc.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/research/xenoarchaeology/misc.dm b/code/modules/research/xenoarchaeology/misc.dm index 37bc4c6ccc1..6b95d6dfc8a 100644 --- a/code/modules/research/xenoarchaeology/misc.dm +++ b/code/modules/research/xenoarchaeology/misc.dm @@ -142,6 +142,7 @@ proc/SetupXenoarch() new /obj/item/weapon/storage/belt/archaeology(src) new /obj/item/weapon/storage/box/excavation(src) new /obj/item/device/flashlight/lantern(src) + new /obj/item/device/ano_scanner(src) new /obj/item/device/depth_scanner(src) new /obj/item/device/core_sampler(src) new /obj/item/device/gps(src) From 0e369578cc7ebdfe94049def45da5ccb450606a7 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 21 Mar 2014 23:03:06 -0500 Subject: [PATCH 07/23] VV drop down menu to resend NanoUI resource files. Some players are having issues with NanoUI not opening up or acting funny before the only fix was to have them log out, and log back in, check if that worked. If not log out, delete cache log back in, if that don't work not much can be done. Now we just skip the whole logout login thing and force the server to send the files to their client once again skipping the need for their character to take a dirtnap for a moment. --- code/datums/datumvars.dm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index c335a6f1fac..b6e157c59b8 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -259,6 +259,8 @@ client body += "" body += "" + body += "" + body += "" body += "" if(ishuman(D)) @@ -859,6 +861,25 @@ client H.verbs -= verb + else if(href_list["fix_nano"]) + if(!check_rights(R_DEBUG)) return + + var/mob/H = locate(href_list["fix_nano"]) + + if(!istype(H) || !H.client) + usr << "This can only be done on mobs with clients" + return + + + + nanomanager.send_resources(H.client) + + usr << "Resource files sent" + H << "Your NanoUI Resource files have been refreshed" + + log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ") + + else if(href_list["regenerateicons"]) if(!check_rights(0)) return From f1506acf1ec3efcd2741ae71c3a0f8e7b7eb08e5 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Mar 2014 04:33:48 -0500 Subject: [PATCH 08/23] Code effeciency project: Handle_Organs (human/life()) We do a bit of pre-processing to see if we want to do checks on all the organs. First we don't even do preprocessing unless we have damage of some kind afterwards we process what is hurt until it gets better or overall we get worse when we go ahead and check everything else out again. Can add a safety check in life every 30 ticks or so go ahead and check every organ again but I don't think it's needed. --- .../mob/living/carbon/human/human_defines.dm | 5 +- code/modules/mob/living/carbon/human/life.dm | 9 +- code/modules/organs/organ.dm | 96 +++++++++++-------- code/modules/organs/organ_external.dm | 14 +++ 4 files changed, 79 insertions(+), 45 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 4611dda0d82..6926adde9bb 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -53,7 +53,10 @@ var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. + var/last_dam = -1 //Used for determining if we need to process all organs or just some or even none. + var/list/bad_external_organs = list()// organs we check until they are good. + var/xylophone = 0 //For the spoooooooky xylophone cooldown var/mob/remoteview_target = null - var/hand_blood_color \ No newline at end of file + var/hand_blood_color diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b80c848bfa4..9009cbf2dbc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -997,8 +997,8 @@ else //ALIVE. LIGHTS ARE ON updatehealth() //TODO if(!in_stasis) - handle_organs() - handle_blood() + handle_organs() //Optimized. + handle_blood() if(health <= config.health_threshold_dead || brain_op_stage == 4.0) death() @@ -1109,20 +1109,21 @@ if(stuttering) stuttering = max(stuttering-1, 0) - if (src.slurring) + if (slurring) slurring = max(slurring-1, 0) if(silent) silent = max(silent-1, 0) if(druggy) druggy = max(druggy-1, 0) - +/* // Increase germ_level regularly if(prob(40)) germ_level += 1 // If you're dirty, your gloves will become dirty, too. if(gloves && germ_level > gloves.germ_level && prob(10)) gloves.germ_level += 1 +*/ return 1 proc/handle_regular_hud_updates() diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index eec57edea9a..3e169f22b6b 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -69,54 +69,70 @@ /mob/living/carbon/human/proc/handle_organs() number_wounds = 0 var/leg_tally = 2 - for(var/datum/organ/external/E in organs) + var/force_process = 0 + var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss() + if(damage_this_tick > last_dam) + force_process = 1 + last_dam = damage_this_tick + if(!force_process && !bad_external_organs.len) + return + if(force_process) + bad_external_organs.Cut() + for(var/datum/organ/external/Ex in organs) + bad_external_organs += Ex + + for(var/datum/organ/external/E in bad_external_organs) if(!E) continue - E.process() - number_wounds += E.number_wounds + if(!E.need_process()) + bad_external_organs -= E + continue + else + E.process() + number_wounds += E.number_wounds - //Robotic limb malfunctions - var/malfunction = 0 - if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam)) - malfunction = 1 + //Robotic limb malfunctions + var/malfunction = 0 + if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam)) + malfunction = 1 - //Broken limbs hurt too - var/broken = 0 - if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) ) - broken = 1 + //Broken limbs hurt too + var/broken = 0 + if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) ) + broken = 1 - //Moving around with fractured ribs won't do you any good - if (broken && E.internal_organs && prob(15)) - if (!lying && world.timeofday - l_move_time < 15) - var/datum/organ/internal/I = pick(E.internal_organs) - custom_pain("You feel broken bones moving in your [E.display_name]!", 1) - I.take_damage(rand(3,5)) + //Moving around with fractured ribs won't do you any good + if (broken && E.internal_organs && prob(15)) + if (!lying && world.timeofday - l_move_time < 15) + var/datum/organ/internal/I = pick(E.internal_organs) + custom_pain("You feel broken bones moving in your [E.display_name]!", 1) + I.take_damage(rand(3,5)) - //Special effects for limbs. - if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction)) - var/obj/item/c_hand //Getting what's in this hand - if(E.name == "l_hand" || E.name == "l_arm") - c_hand = l_hand - if(E.name == "r_hand" || E.name == "r_arm") - c_hand = r_hand + //Special effects for limbs. + if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction)) + var/obj/item/c_hand //Getting what's in this hand + if(E.name == "l_hand" || E.name == "l_arm") + c_hand = l_hand + if(E.name == "r_hand" || E.name == "r_arm") + c_hand = r_hand - if (c_hand) - u_equip(c_hand) + if (c_hand) + u_equip(c_hand) - if(broken) - emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!") - if(malfunction) - emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!") - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src) - spark_system.attach(src) - spark_system.start() - spawn(10) - del(spark_system) + if(broken) + emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!") + if(malfunction) + emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!") + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + spark_system.start() + spawn(10) + del(spark_system) - else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying) - if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED))) - leg_tally-- // let it fail even if just foot&leg + else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying) + if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED))) + leg_tally-- // let it fail even if just foot&leg // standing is poor if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5)) @@ -124,7 +140,7 @@ emote("scream") emote("collapse") paralysis = 10 - + //Check arms and legs for existence can_stand = 2 //can stand on both legs var/datum/organ/external/E = organs_by_name["l_foot"] diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 27d8db993fd..28c2324bae2 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -12,6 +12,7 @@ var/burn_dam = 0 var/max_damage = 0 var/max_size = 0 + var/last_dam = -1 var/display_name var/list/wounds = list() @@ -273,6 +274,19 @@ This function completely restores a damaged organ to perfect condition. PROCESSING & UPDATING ****************************************************/ +//Determines if we even need to process this organ. + +/datum/organ/external/proc/need_process() + if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status. + return 1 + if(brute_dam || burn_dam) + return 1 + if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up. + last_dam = brute_dam + burn_dam + return 1 + last_dam = brute_dam + burn_dam + return 0 + /datum/organ/external/process() // Process wounds, doing healing etc. Only do this every few ticks to save processing power if(owner.life_tick % wound_update_accuracy == 0) From ce83c5c64e3461726b2cef08cbc1e131766f653f Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Mar 2014 06:22:01 -0500 Subject: [PATCH 09/23] Code effeciency project: handle_environment (human/life()) Before: We process a whole lot of bullshit for no real reason most of the time because temperatures are perfect. Now: We check if our temperatures and environment are within normal bounds and get the hell out of the proc. Also: Mobs that are long dead or just dead mobs spawned at round start won't process Life(), those 3 clowns don't need Life(), those jerks. --- code/modules/mob/living/carbon/human/life.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9009cbf2dbc..d7d6aa913d6 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -104,11 +104,14 @@ handle_stasis_bag() + if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle + return //We go ahead and process them 5 times for HUD images and other stuff though. + //Handle temperature/pressure differences between body and environment - handle_environment(environment) + handle_environment(environment) //Optimized a good bit. //Status updates, death etc. - handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp + handle_regular_status_updates() //Optimized a bit update_canmove() //Update our name based on whether our face is obscured/disfigured @@ -575,25 +578,23 @@ else loc_temp = environment.temperature - //world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]" + if(abs(loc_temp - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) + return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp //Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit. if(stat != 2) stabilize_temperature_from_calories() - // log_debug("Adjusting to atmosphere.") //After then, it reacts to the surrounding atmosphere based on your thermal protection if(loc_temp < BODYTEMP_COLD_DAMAGE_LIMIT) //Place is colder than we are var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX) - // log_debug("[loc_temp] is Cold. Cooling by [amt]") bodytemperature += amt else if (loc_temp > BODYTEMP_HEAT_DAMAGE_LIMIT) //Place is hotter than we are var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX) - // log_debug("[loc_temp] is Heat. Heating up by [amt]") bodytemperature += amt // +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt. @@ -683,7 +684,7 @@ proc/stabilize_temperature_from_calories() var/body_temperature_difference = 310.15 - bodytemperature - if (abs(body_temperature_difference) < 0.01) + if (abs(body_temperature_difference) < 0.5) return //fuck this precision switch(bodytemperature) if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects. From 8106b6a4ae255eacd3d9a261aaed53e62da21ae1 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Mar 2014 06:56:09 -0500 Subject: [PATCH 10/23] Code Effeciency project: Damn monkies Life() pretty much the same effeciencies from human/life() no need to updatehealth() over and over and over no need to process environment if everything is normal etc. --- code/modules/mob/living/carbon/monkey/life.dm | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index bb1b48a0cad..9c902c87292 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -78,6 +78,8 @@ if(prob(1)) emote(pick("scratch","jump","roll","tail")) + updatehealth() + /mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure) ..() @@ -132,7 +134,6 @@ heal_overall_damage(rads,rads) adjustOxyLoss(-(rads)) adjustToxLoss(-(rads)) - updatehealth() return if (radiation > 100) @@ -146,7 +147,6 @@ radiation-- if(prob(25)) adjustToxLoss(1) - updatehealth() if(50 to 74) radiation -= 2 @@ -156,7 +156,6 @@ Weaken(3) src << "\red You feel weak." emote("collapse") - updatehealth() if(75 to 100) radiation -= 3 @@ -166,7 +165,6 @@ randmutb(src) domutcheck(src,null) emote("gasp") - updatehealth() proc/handle_virus_updates() if(status_flags & GODMODE) return 0 //godmode @@ -392,6 +390,10 @@ proc/handle_environment(datum/gas_mixture/environment) if(!environment) return + + if(abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) + return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp + var/environment_heat_capacity = environment.heat_capacity() if(istype(get_turf(src), /turf/space)) var/turf/heat_turf = get_turf(src) @@ -460,7 +462,8 @@ adjustToxLoss(-1) adjustOxyLoss(-1) - if(reagents) reagents.metabolize(src,alien) + if(reagents && reagents.reagent_list.len) + reagents.metabolize(src,alien) if (drowsyness) drowsyness-- @@ -469,24 +472,23 @@ sleeping += 1 Paralyse(5) - confused = max(0, confused - 1) - // decrement dizziness counter, clamped to 0 + if(confused) + confused = max(0, confused - 1) + if(resting) dizziness = max(0, dizziness - 5) else dizziness = max(0, dizziness - 1) - updatehealth() - return //TODO: DEFERRED proc/handle_regular_status_updates() - updatehealth() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 silent = 0 else //ALIVE. LIGHTS ARE ON + updatehealth() if(health < config.health_threshold_dead || brain_op_stage == 4.0) death() blinded = 1 From 28392e94149d833ef8df4260ffd993c02ca40854 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Mar 2014 07:50:23 -0500 Subject: [PATCH 11/23] Code effeciency project: handle_virus_something() (human and monkey /Life()) 2 for loops is more expensive then what we're doing here. Also we check to see if virus2 is populated before starting a for loop --- code/modules/mob/living/carbon/human/life.dm | 47 ++++++++++-------- code/modules/mob/living/carbon/monkey/life.dm | 48 +++++++++++-------- 2 files changed, 53 insertions(+), 42 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d7d6aa913d6..9006124bf93 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1414,30 +1414,35 @@ var/datum/disease2/disease/V = virus2[ID] V.cure(src) - for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) - if(B.virus2.len) - for (var/ID in B.virus2) - var/datum/disease2/disease/V = B.virus2[ID] - infect_virus2(src,V) + for(var/obj/effect/decal/cleanable/O in view(1,src)) + if(istype(O,/obj/effect/decal/cleanable/blood)) + var/obj/effect/decal/cleanable/blood/B = O + if(B.virus2.len) + for (var/ID in B.virus2) + var/datum/disease2/disease/V = B.virus2[ID] + infect_virus2(src,V) - for(var/obj/effect/decal/cleanable/mucus/M in view(1,src)) - if(M.virus2.len) - for (var/ID in M.virus2) - var/datum/disease2/disease/V = M.virus2[ID] - infect_virus2(src,V) + else if(istype(O,/obj/effect/decal/cleanable/mucus)) + var/obj/effect/decal/cleanable/mucus/M = O + if(M.virus2.len) + for (var/ID in M.virus2) + var/datum/disease2/disease/V = M.virus2[ID] + infect_virus2(src,V) - for (var/ID in virus2) - var/datum/disease2/disease/V = virus2[ID] - if(isnull(V)) // Trying to figure out a runtime error that keeps repeating - CRASH("virus2 nulled before calling activate()") - else - V.activate(src) - // activate may have deleted the virus - if(!V) continue - // check if we're immune - if(V.antigen & src.antibodies) - V.dead = 1 + if(virus2.len) + for (var/ID in virus2) + var/datum/disease2/disease/V = virus2[ID] + if(isnull(V)) // Trying to figure out a runtime error that keeps repeating + CRASH("virus2 nulled before calling activate()") + else + V.activate(src) + // activate may have deleted the virus + if(!V) continue + + // check if we're immune + if(V.antigen & src.antibodies) + V.dead = 1 return diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 9c902c87292..7e2d73abe4f 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -174,30 +174,36 @@ for (var/ID in virus2) var/datum/disease2/disease/V = virus2[ID] V.cure(src) + + for(var/obj/effect/decal/cleanable/O in view(1,src)) + if(istype(O,/obj/effect/decal/cleanable/blood)) + var/obj/effect/decal/cleanable/blood/B = O + if(B.virus2.len) + for (var/ID in B.virus2) + var/datum/disease2/disease/V = B.virus2[ID] + infect_virus2(src,V) - for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) - if(B.virus2.len) - for (var/ID in B.virus2) - var/datum/disease2/disease/V = B.virus2[ID] - infect_virus2(src,V) - for(var/obj/effect/decal/cleanable/mucus/M in view(1,src)) - if(M.virus2.len) - for (var/ID in M.virus2) - var/datum/disease2/disease/V = M.virus2[ID] - infect_virus2(src,V) + else if(istype(O,/obj/effect/decal/cleanable/mucus)) + var/obj/effect/decal/cleanable/mucus/M = O - for (var/ID in virus2) - var/datum/disease2/disease/V = virus2[ID] - if(isnull(V)) // Trying to figure out a runtime error that keeps repeating - CRASH("virus2 nulled before calling activate()") - else - V.activate(src) - // activate may have deleted the virus - if(!V) continue + if(M.virus2.len) + for (var/ID in M.virus2) + var/datum/disease2/disease/V = M.virus2[ID] + infect_virus2(src,V) - // check if we're immune - if(V.antigen & src.antibodies) - V.dead = 1 + if(virus2.len) + for (var/ID in virus2) + var/datum/disease2/disease/V = virus2[ID] + if(isnull(V)) // Trying to figure out a runtime error that keeps repeating + CRASH("virus2 nulled before calling activate()") + else + V.activate(src) + // activate may have deleted the virus + if(!V) continue + + // check if we're immune + if(V.antigen & src.antibodies) + V.dead = 1 return From 7000cce408e54c178cab69c90f647614462b7e12 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 23 Mar 2014 02:26:06 -0500 Subject: [PATCH 12/23] Admin Request: Logs now will end in CRLF on unix systems. Also removed the "SERVER HAS CALLED FOR A VOTE" spam --- code/__HELPERS/logging.dm | 32 ++++++++++++++--------------- code/controllers/configuration.dm | 16 +++++++-------- code/datums/helper_datums/getrev.dm | 2 +- code/game/gamemodes/gameticker.dm | 7 ++++++- code/modules/admin/ToRban.dm | 8 ++++---- code/modules/admin/banjob.dm | 4 ++-- code/world.dm | 12 +++++------ 7 files changed, 43 insertions(+), 38 deletions(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 3519417dd78..eec190c1c21 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -1,24 +1,24 @@ //print an error message to world.log /proc/error(msg) - world.log << "## ERROR: [msg]" + world.log << "## ERROR: [msg][world.system_type == UNIX ? ascii2text(13) :]" //print a warning message to world.log /proc/warning(msg) - world.log << "## WARNING: [msg]" + world.log << "## WARNING: [msg][world.system_type == UNIX ? ascii2text(13) :]" //print a testing-mode debug message to world.log /proc/testing(msg) - world.log << "## TESTING: [msg]" + world.log << "## TESTING: [msg][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_admin(text) admin_log.Add(text) if (config.log_admin) - diary << "\[[time_stamp()]]ADMIN: [text]" + diary << "\[[time_stamp()]]ADMIN: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_debug(text) if (config.log_debug) - diary << "\[[time_stamp()]]DEBUG: [text]" + diary << "\[[time_stamp()]]DEBUG: [text][world.system_type == UNIX ? ascii2text(13) :]" for(var/client/C in admins) if(C.prefs.toggles & CHAT_DEBUGLOGS) @@ -27,44 +27,44 @@ /proc/log_game(text) if (config.log_game) - diary << "\[[time_stamp()]]GAME: [text]" + diary << "\[[time_stamp()]]GAME: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_vote(text) if (config.log_vote) - diary << "\[[time_stamp()]]VOTE: [text]" + diary << "\[[time_stamp()]]VOTE: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_access(text) if (config.log_access) - diary << "\[[time_stamp()]]ACCESS: [text]" + diary << "\[[time_stamp()]]ACCESS: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_say(text) if (config.log_say) - diary << "\[[time_stamp()]]SAY: [text]" + diary << "\[[time_stamp()]]SAY: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_ooc(text) if (config.log_ooc) - diary << "\[[time_stamp()]]OOC: [text]" + diary << "\[[time_stamp()]]OOC: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_whisper(text) if (config.log_whisper) - diary << "\[[time_stamp()]]WHISPER: [text]" + diary << "\[[time_stamp()]]WHISPER: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_emote(text) if (config.log_emote) - diary << "\[[time_stamp()]]EMOTE: [text]" + diary << "\[[time_stamp()]]EMOTE: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_attack(text) if (config.log_attack) - diary << "\[[time_stamp()]]ATTACK: [text]" //Seperate attack logs? Why? + diary << "\[[time_stamp()]]ATTACK: [text][world.system_type == UNIX ? ascii2text(13) :]" //Seperate attack logs? Why? FOR THE GLORY OF SATAN! /proc/log_adminsay(text) if (config.log_adminchat) - diary << "\[[time_stamp()]]ADMINSAY: [text]" + diary << "\[[time_stamp()]]ADMINSAY: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_adminwarn(text) if (config.log_adminwarn) - diary << "\[[time_stamp()]]ADMINWARN: [text]" + diary << "\[[time_stamp()]]ADMINWARN: [text][world.system_type == UNIX ? ascii2text(13) :]" /proc/log_pda(text) if (config.log_pda) - diary << "\[[time_stamp()]]PDA: [text]" \ No newline at end of file + diary << "\[[time_stamp()]]PDA: [text][world.system_type == UNIX ? ascii2text(13) :]" diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index e96323c6584..74d8b1d3df5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -150,7 +150,7 @@ if (M.config_tag) if(!(M.config_tag in modes)) // ensure each mode is added only once - diary << "Adding game mode [M.name] ([M.config_tag]) to configuration." + diary << "Adding game mode [M.name] ([M.config_tag]) to configuration.[world.system_type == UNIX ? ascii2text(13) :]" src.modes += M.config_tag src.mode_names[M.config_tag] = M.name src.probabilities[M.config_tag] = M.probability @@ -362,9 +362,9 @@ if (prob_name in config.modes) config.probabilities[prob_name] = text2num(prob_value) else - diary << "Unknown game mode probability configuration definition: [prob_name]." + diary << "Unknown game mode probability configuration definition: [prob_name].[world.system_type == UNIX ? ascii2text(13) :]" else - diary << "Incorrect probability configuration definition: [prob_name] [prob_value]." + diary << "Incorrect probability configuration definition: [prob_name] [prob_value].[world.system_type == UNIX ? ascii2text(13) :]" if("allow_random_events") config.allow_random_events = 1 @@ -484,11 +484,11 @@ config.cult_ghostwriter_req_cultists = value else - diary << "Unknown setting in configuration: '[name]'" + diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" else if(type == "game_options") if(!value) - diary << "Unknown value for setting [name] in [filename]." + diary << "Unknown value for setting [name] in [filename].[world.system_type == UNIX ? ascii2text(13) :]" value = text2num(value) switch(name) @@ -529,7 +529,7 @@ if("limbs_can_break") config.limbs_can_break = value else - diary << "Unknown setting in configuration: '[name]'" + diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" /datum/configuration/proc/loadsql(filename) // -- TLE var/list/Lines = file2list(filename) @@ -575,7 +575,7 @@ if ("enable_stat_tracking") sqllogging = 1 else - diary << "Unknown setting in configuration: '[name]'" + diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" /datum/configuration/proc/loadforumsql(filename) // -- TLE var/list/Lines = file2list(filename) @@ -617,7 +617,7 @@ if ("authenticatedgroup") forum_authenticated_group = value else - diary << "Unknown setting in configuration: '[name]'" + diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" /datum/configuration/proc/pick_mode(mode_name) // I wish I didn't have to instance the game modes in order to look up diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index 512e9f02dce..8c298d0d806 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -63,7 +63,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt") s_archive = s if(!revision) abort() - diary << "Revision info loaded succesfully" + diary << "Revision info loaded succesfully[world.system_type == UNIX ? ascii2text(13) :]" return return abort() diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 371db0de19e..d42f88e8913 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -57,7 +57,12 @@ var/global/datum/controller/gameticker/ticker if(going) pregame_timeleft-- if(pregame_timeleft == config.vote_autogamemode_timeleft) - vote.autogamemode() + if(!vote.time_remaining) + vote.autogamemode() //Quit calling this over and over and over and over. + while(vote.time_remaining) + for(var/i=0, i<10, i++) + sleep(1) + vote.process() if(pregame_timeleft <= 0) current_state = GAME_STATE_SETTING_UP while (!setup()) diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm index ea70d023758..1018f074fef 100644 --- a/code/modules/admin/ToRban.dm +++ b/code/modules/admin/ToRban.dm @@ -22,7 +22,7 @@ /proc/ToRban_update() spawn(0) - diary << "Downloading updated ToR data..." + diary << "Downloading updated ToR data...[world.system_type == UNIX ? ascii2text(13) :]" var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses") var/list/rawlist = file2list(http["CONTENT"]) @@ -36,10 +36,10 @@ if(!cleaned) continue F[cleaned] << 1 F["last_update"] << world.realtime - diary << "ToR data updated!" + diary << "ToR data updated![world.system_type == UNIX ? ascii2text(13) :]" if(usr) usr << "ToRban updated." return 1 - diary << "ToR data update aborted: no data." + diary << "ToR data update aborted: no data.[world.system_type == UNIX ? ascii2text(13) :]" return 0 /client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) @@ -85,4 +85,4 @@ return #undef TORFILE -#undef TOR_UPDATE_INTERVAL \ No newline at end of file +#undef TOR_UPDATE_INTERVAL diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 42326711d35..e797f52cc1e 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -66,8 +66,8 @@ DEBUG log_admin("jobban_keylist was empty") else if(!establish_db_connection()) - world.log << "Database connection failed. Reverting to the legacy ban system." - diary << "Database connection failed. Reverting to the legacy ban system." + world.log << "Database connection failed. Reverting to the legacy ban system.[world.system_type == UNIX ? ascii2text(13) :]" + diary << "Database connection failed. Reverting to the legacy ban system.[world.system_type == UNIX ? ascii2text(13) :]" config.ban_legacy_system = 1 jobban_loadbanfile() return diff --git a/code/world.dm b/code/world.dm index 8c7a9d87931..babfdf9c361 100644 --- a/code/world.dm +++ b/code/world.dm @@ -14,8 +14,8 @@ href_logfile = file("data/logs/[date_string] hrefs.htm") diary = file("data/logs/[date_string].log") diaryofmeanpeople = file("data/logs/[date_string] Attack.log") - diary << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")]\n---------------------" - diaryofmeanpeople << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")]\n---------------------" + diary << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------[world.system_type == UNIX ? ascii2text(13) :]" + diaryofmeanpeople << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------" changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently if(byond_version < RECOMMENDED_VERSION) @@ -67,7 +67,7 @@ // ..() /world/Topic(T, addr, master, key) - diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]" + diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][world.system_type == UNIX ? ascii2text(13) :]" if (T == "ping") var/x = 1 @@ -147,7 +147,7 @@ if(Lines.len) if(Lines[1]) master_mode = Lines[1] - diary << "Saved mode is '[master_mode]'" + diary << "Saved mode is '[master_mode]'[world.system_type == UNIX ? ascii2text(13) :]" /world/proc/save_mode(var/the_mode) var/F = file("data/mode.txt") @@ -181,7 +181,7 @@ if(config.admin_legacy_system) var/text = file2text("config/moderators.txt") if (!text) - diary << "Failed to load config/mods.txt\n" + diary << "Failed to load config/mods.txt[world.system_type == UNIX ? ascii2text(13) :]" else var/list/lines = text2list(text, "\n") for(var/line in lines) @@ -343,4 +343,4 @@ proc/establish_old_db_connection() else return 1 -#undef FAILED_DB_CONNECTION_CUTOFF \ No newline at end of file +#undef FAILED_DB_CONNECTION_CUTOFF From 6fa08b233d236144641389f83654c98c0cc8e458 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 23 Mar 2014 04:44:06 -0500 Subject: [PATCH 13/23] Law office -> Internal Affairs in Area code. fixes #4577 --- code/game/area/Space Station 13 areas.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index a3412bb0054..191d47fb17e 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -857,7 +857,7 @@ var/list/ghostteleportlocs = list() icon_state = "chapeloffice" /area/lawoffice - name = "\improper Law Office" + name = "\improper Internal Affairs" icon_state = "law" From d08bff84c9aeb5ece71cc036f67753e9b0d54fee Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 23 Mar 2014 05:43:18 -0500 Subject: [PATCH 14/23] Bugfix 2: Electric Boogaloo, Ninjas being tracked by AI's Removed AI's ability to track them sneaky ninja's. --- code/game/machinery/camera/tracking.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index e088103fabd..b019c4ee862 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -77,10 +77,8 @@ //Cameras can't track people wearing an agent card or a ninja hood. if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) continue - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) - var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head - if(!hood.canremove) - continue + if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) + continue // Now, are they viewable by a camera? (This is last because it's the most intensive check) if(!near_camera(M)) @@ -137,8 +135,8 @@ U << "Follow camera mode terminated." U.cameraFollow = null return - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove) - U << "Follow camera mode terminated." + if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) + U << "Follow camera mode terminated." U.cameraFollow = null return if(H.digitalcamo) @@ -199,4 +197,4 @@ else if (sorttext(a.c_tag, b.c_tag) < 0) L.Swap(j, j + 1) - return L \ No newline at end of file + return L From 0225d7b3b05b09f7aed66a1de249e7f871803325 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 23 Mar 2014 06:03:04 -0500 Subject: [PATCH 15/23] Bug fix 3: Now with a vengence. Monkey pockets cause scrolled chat. Added the check to see what you clicked in the inventory when clicking on pockets and added a message for it. Now it won't just be a line break. Fixes #4601 --- code/modules/mob/living/carbon/monkey/inventory.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm index e9f57611620..adeb4f903a8 100644 --- a/code/modules/mob/living/carbon/monkey/inventory.dm +++ b/code/modules/mob/living/carbon/monkey/inventory.dm @@ -58,6 +58,8 @@ message = text("\red [] is trying to remove []'s internals", source, target) else message = text("\red [] is trying to set on []'s internals.", source, target) + if("pockets") + message = text("\red [] is trying to empty []'s pockets",source, target) else for(var/mob/M in viewers(target, null)) M.show_message(message, 1) @@ -233,4 +235,4 @@ W.layer = 20 - return \ No newline at end of file + return From 2073d7dc783eb60b2044f482cb7d03ae49ff6712 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sun, 23 Mar 2014 06:18:02 -0500 Subject: [PATCH 16/23] Bugfix 4: Return of the access to engineering dorms. Medical now has access to engineering dorms and because they have to walk through it, engineering break room. Medics are wimps, if they shit up the break room engineering can just smack them around with some tanks or something. Fixes #4583 --- maps/tgstation2.dmm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index 130cc7687bb..fd5df2a38e8 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -3626,14 +3626,14 @@ "brL" = (/obj/structure/stool/bed/chair/office/dark{dir = 8},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "blue"; dir = 8},/area/crew_quarters/heads) "brM" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/carpet,/area/engine/break_room) "brN" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/carpet,/area/crew_quarters/heads) -"brO" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access_txt = "11;24"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/engine/break_room) +"brO" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access_txt = "11;24;5"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/engine/break_room) "brP" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor,/area/crew_quarters/heads) "brQ" = (/obj/structure/sign/kiddieplaque,/turf/simulated/wall/r_wall,/area/turret_protected/ai_upload) "brR" = (/obj/structure/table,/obj/item/weapon/aiModule/reset,/obj/machinery/camera{c_tag = "AI Upload Chamber"; dir = 4; network = list("SS13")},/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor/bluegrid,/area/turret_protected/ai_upload) "brS" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor{icon_state = "dark"},/area/turret_protected/ai_upload) "brT" = (/obj/structure/table,/obj/item/weapon/aiModule/protectStation,/obj/machinery/light{dir = 4},/turf/simulated/floor/bluegrid,/area/turret_protected/ai_upload) "brU" = (/turf/simulated/wall/r_wall,/area/turret_protected/ai_upload) -"brV" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/machinery/door/airlock/engineering{name = "Engineering Dormitories"; req_one_access_txt = "11;24"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/crew_quarters/sleep/engi) +"brV" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/machinery/door/airlock/engineering{name = "Engineering Dormitories"; req_one_access_txt = "11;24;5"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/crew_quarters/sleep/engi) "brW" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1; scrub_Toxins = 0},/obj/structure/table/woodentable,/obj/item/device/flashlight/lamp/green,/turf/simulated/floor/carpet,/area/crew_quarters/captain) "brX" = (/obj/structure/stool/bed/chair/comfy/brown{dir = 4},/obj/machinery/camera{c_tag = "Captain's Quarters"; dir = 1},/turf/simulated/floor/carpet,/area/crew_quarters/captain) "brY" = (/obj/structure/table/woodentable,/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -29},/obj/item/weapon/storage/box/matches,/obj/item/clothing/mask/cigarette/cigar,/obj/item/weapon/reagent_containers/food/drinks/flask{pixel_x = 8},/turf/simulated/floor/carpet,/area/crew_quarters/captain) @@ -3986,7 +3986,7 @@ "byH" = (/obj/machinery/door/airlock/maintenance{name = "Engineering Maintainance"; req_access_txt = "12"; req_one_access_txt = "11;24"},/turf/simulated/floor/plating,/area/crew_quarters/sleep/engi) "byI" = (/obj/machinery/atmospherics/trinary/mixer,/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "byJ" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/carpet,/area/engine/break_room) -"byK" = (/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access_txt = "11;24"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/engine/break_room) +"byK" = (/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access_txt = "11;24;5"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/engine/break_room) "byL" = (/obj/structure/stool/bed/chair/comfy/beige{dir = 1; icon_state = "comfychair_beige"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/effect/landmark/start{name = "Station Engineer"},/turf/simulated/floor/carpet,/area/engine/break_room) "byM" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 1},/turf/simulated/floor/carpet,/area/engine/break_room) "byN" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; icon_state = "off"; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor,/area/hallway/primary/aft) @@ -4034,7 +4034,7 @@ "bzD" = (/obj/structure/stool/bed/chair/comfy/beige{dir = 1; icon_state = "comfychair_beige"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/effect/landmark/start{name = "Atmospheric Technician"},/turf/simulated/floor/carpet,/area/engine/break_room) "bzE" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor{icon_state = "dark"},/area/turret_protected/ai_upload_foyer) "bzF" = (/obj/machinery/power/apc{dir = 4; name = "AI Upload Access APC"; pixel_x = 27; pixel_y = -2},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor{icon_state = "dark"},/area/turret_protected/ai_upload_foyer) -"bzG" = (/obj/machinery/door/airlock/engineering{name = "Engineering Dormitories"; req_one_access_txt = "11;24"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/crew_quarters/sleep/engi) +"bzG" = (/obj/machinery/door/airlock/engineering{name = "Engineering Dormitories"; req_one_access_txt = "11;24;5"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.4; name = "Engineering Firelock"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/crew_quarters/sleep/engi) "bzH" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1; scrub_Toxins = 0},/obj/machinery/light_switch{pixel_y = -25},/obj/machinery/camera{c_tag = "Cyborg Station"; dir = 1},/obj/structure/closet/crate{name = "Camera Assembly Crate"},/obj/item/weapon/camera_assembly,/obj/item/weapon/camera_assembly,/obj/item/weapon/camera_assembly,/obj/item/weapon/camera_assembly,/obj/item/weapon/camera_assembly,/turf/simulated/floor{icon_state = "dark"},/area/comms{name = "\improper Cyborg Station"}) "bzI" = (/obj/machinery/alarm{dir = 1; icon_state = "alarm0"; pixel_y = -22},/obj/machinery/recharge_station,/turf/simulated/floor/bluegrid,/area/comms{name = "\improper Cyborg Station"}) "bzJ" = (/obj/machinery/recharge_station,/turf/simulated/floor/bluegrid,/area/comms{name = "\improper Cyborg Station"}) From a18dcaf0e125fcf5284cdb52b83e561135cc9349 Mon Sep 17 00:00:00 2001 From: ZekeSulastin Date: Sun, 23 Mar 2014 12:46:28 -0400 Subject: [PATCH 17/23] Fixed 45-cal magazine icon filling inversion --- icons/obj/ammo.dmi | Bin 4495 -> 4493 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index 05f5f846a734d45ff6dac1e93d0ce2e62e037105..10fae561b764edd7c00d2d8079f8921e248f3769 100644 GIT binary patch delta 3534 zcmY*b2{_bi7dK-DW6u&5#!^v|B~#X!L0RhFhLEz1pe!bu8JJv5#$-h4Jaz?(@CRd7g95d(Qhl@9#Y4J?CWT-PNlu69W}`qzvl;l;PE4C`{g8OPuAb*0GKQe<`itGbMG_6Z~0Q%5X< z+Si|+x;OT#7(N-{t5>B_oC@rX<%;1m_49(NRB%OW%0Ja&miED=!|_P^8S3TM{Zg(; z$Jp8f$UP(P(|w7@##qIBRxGijs=U*S8F+|SR@LI|ZHX(h@f+VvDSLER-svd8bnb3Pa9)`CY#v7bJ})TsyCmR%W@_c(6+Gd3 zW$5$7m$u-mHC6Fg&DAEISc;bJ+HD;(xICy81zDeeG_4F;kyeqA!lq%GF%W|)^v5R? zA$JM+!+Zv~@O@?i`8L;pZk$&@+1TBh%IEWU&{TRURM(6kbf?%67?VfX19l&W(VH>{ z2MzZ#y7NBwMbdyMK`1_}&7RCC=lv1?BVzxhOXfZw5(*y=?f$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23 Mar 2014 13:49:44 -0500 Subject: [PATCH 18/23] NVG Bugfix Now they work, and also added a green hud element that tints the screen green when nvg's are worn. --- code/_onclick/hud/hud.dm | 8 ++++++++ code/modules/clothing/glasses/glasses.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 9 ++++++--- icons/obj/nvg_hud_full.dmi | Bin 0 -> 2075 bytes 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 icons/obj/nvg_hud_full.dmi diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 98e2fda1862..5e005c5f0e9 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -14,6 +14,7 @@ var/datum/global_hud/global_hud = new() var/obj/screen/blurry var/list/vimpaired var/list/darkMask + var/obj/screen/nvg /datum/global_hud/New() //420erryday psychedellic colours screen overlay for when you are high @@ -30,6 +31,13 @@ var/datum/global_hud/global_hud = new() blurry.layer = 17 blurry.mouse_opacity = 0 + nvg = new /obj/screen() + nvg.screen_loc = "1,1" + nvg.icon = 'icons/obj/nvg_hud_full.dmi' + nvg.icon_state = "nvg_hud" + nvg.layer = 17 + nvg.mouse_opacity = 0 + var/obj/screen/O var/i //that nasty looking dither you get when you're short-sighted diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 7ee835da35e..7897e8ce16e 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -35,7 +35,7 @@ icon_state = "night" item_state = "glasses" origin_tech = "magnets=2" - darkness_view = 3 + darkness_view = 7 /obj/item/clothing/glasses/eyepatch name = "eyepatch" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9006124bf93..e1a97358004 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1138,7 +1138,7 @@ if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe client.images.Remove(hud) - client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask) + client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg) update_action_buttons() @@ -1277,8 +1277,9 @@ see_in_dark += G.darkness_view if(G.vision_flags) sight |= G.vision_flags - if(!druggy) - see_invisible = SEE_INVISIBLE_MINIMUM + if(istype(G,/obj/item/clothing/glasses/night)) + see_invisible = SEE_INVISIBLE_MINIMUM + client.screen += global_hud.nvg /* HUD shit goes here, as long as it doesn't modify sight flags */ // The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl @@ -1296,6 +1297,8 @@ else if(!seer) see_invisible = SEE_INVISIBLE_LIVING + + if(healths) if (analgesic) healths.icon_state = "health_health_numb" diff --git a/icons/obj/nvg_hud_full.dmi b/icons/obj/nvg_hud_full.dmi new file mode 100644 index 0000000000000000000000000000000000000000..b9f8ad97e0ef072d443be1ae76a460e0a9c4e16d GIT binary patch literal 2075 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0;$5PkcbkO)Z*l#%z~24{5%GR ziaEN+H*z&7h_GI``CWASt;Gix9#!orSP|dh5Zuo7C3XM(fZLX)ZG}eMUvgILnDV&P z$ Date: Wed, 26 Mar 2014 17:19:51 -0500 Subject: [PATCH 19/23] Oops, broke Mesons when I fixed NVG's This should put things back where they go. --- code/modules/mob/living/carbon/human/life.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e1a97358004..6cd45981cef 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1275,8 +1275,10 @@ var/obj/item/clothing/glasses/G = glasses if(istype(G)) see_in_dark += G.darkness_view - if(G.vision_flags) + if(G.vision_flags) // MESONS sight |= G.vision_flags + if(!druggy) + see_invisible = SEE_INVISIBLE_MINIMUM if(istype(G,/obj/item/clothing/glasses/night)) see_invisible = SEE_INVISIBLE_MINIMUM client.screen += global_hud.nvg From eb7baa787c424bb46ae1beda271deb910c5f0d92 Mon Sep 17 00:00:00 2001 From: Graham Lloyd Date: Wed, 26 Mar 2014 19:14:39 -0400 Subject: [PATCH 20/23] Holorack --- .../machinery/computer/HolodeckControl.dm | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index bdd313853f3..e02d0de1f00 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -662,4 +662,23 @@ del(W) for(var/mob/M in currentarea) - M << "FIGHT!" \ No newline at end of file + M << "FIGHT!" + +//Holorack + +/obj/structure/rack/holorack + name = "rack" + desc = "Different from the Middle Ages version." + icon = 'icons/obj/objects.dmi' + icon_state = "rack" + +/obj/structure/rack/holorack/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N + return attack_hand(user) + +/obj/structure/rack/holorack/attack_hand(mob/user as mob) + return + +/obj/structure/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob) + if (istype(W, /obj/item/weapon/wrench)) + user << "It's a holorack! You can't unwrench it!" + return \ No newline at end of file From 77c7384eec9dd2f2c6b70cd2da80fc7e3315c88f Mon Sep 17 00:00:00 2001 From: Graham Lloyd Date: Wed, 26 Mar 2014 19:16:33 -0400 Subject: [PATCH 21/23] Map 2 the electric... Eurgh. --- maps/tgstation2.dmm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index fd5df2a38e8..31a7735ac38 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -6489,8 +6489,8 @@ "cuO" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/unsimulated/wall{icon_state = "iron3"},/area) "cuP" = (/obj/structure/flora/ausbushes/fullgrass,/turf/simulated/floor/holofloor/grass,/area/holodeck/source_picnicarea) "cuQ" = (/obj/structure/flora/ausbushes/sparsegrass,/turf/simulated/floor/holofloor/grass,/area/holodeck/source_picnicarea) -"cuR" = (/obj/structure/rack,/obj/item/clothing/under/dress/dress_saloon,/obj/item/clothing/head/hairflower,/turf/simulated/floor/holofloor{icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) -"cuS" = (/obj/effect/landmark/costume,/obj/structure/rack,/turf/simulated/floor/holofloor{icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) +"cuR" = (/obj/effect/decal/cleanable/dirt,/obj/structure/table/holotable/wood,/turf/simulated/floor/holofloor{icon_state = "asteroid"; dir = 2},/area/holodeck/source_picnicarea) +"cuS" = (/obj/effect/landmark/costume,/obj/structure/rack/holorack,/turf/simulated/floor/holofloor{icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) "cuT" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Holodeck Projector Floor"},/area/holodeck/source_wildlife) "cuU" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Holodeck Projector Floor"},/area/holodeck/source_plating) "cuV" = (/turf/simulated/floor/holofloor{icon_state = "engine"; name = "Burn-Mix Floor"; nitrogen = 0; oxygen = 2500; temperature = 370; toxins = 5000},/area/holodeck/source_burntest) @@ -6519,7 +6519,7 @@ "cvs" = (/turf/simulated/floor/holofloor{icon_state = "asteroid7"; dir = 2},/area/holodeck/source_desert) "cvt" = (/turf/simulated/floor/holofloor/grass,/obj/structure/flora/ausbushes/grassybush,/turf/simulated/floor/holofloor{icon_state = "wood_siding5"; dir = 2},/area/holodeck/source_picnicarea) "cvu" = (/obj/machinery/portable_atmospherics/canister/oxygen,/turf/simulated/floor/plating,/area/maintenance/aft) -"cvv" = (/obj/structure/table/woodentable,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/holofloor{icon_state = "asteroid"; dir = 2},/area/holodeck/source_picnicarea) +"cvv" = (/obj/structure/rack/holorack,/obj/item/clothing/under/dress/dress_saloon,/obj/item/clothing/head/hairflower,/turf/simulated/floor/holofloor{icon_state = "cult"; dir = 2},/area/holodeck/source_theatre) "cvw" = (/turf/simulated/floor/holofloor/grass,/obj/structure/flora/ausbushes/grassybush,/turf/simulated/floor/holofloor{icon_state = "wood_siding9"; dir = 2},/area/holodeck/source_picnicarea) "cvx" = (/turf/simulated/floor/holofloor{icon_state = "wood"; dir = 4},/area/holodeck/source_theatre) "cvy" = (/turf/simulated/floor/holofloor{icon_state = "carpet6-2"; dir = 4},/area/holodeck/source_theatre) @@ -6645,7 +6645,7 @@ "cxO" = (/turf/simulated/floor/holofloor{dir = 4; icon_state = "red"},/area/holodeck/source_boxingcourt) "cxP" = (/obj/effect/step_trigger/thrower{affect_ghosts = 1; direction = 2; name = "thrower_throwdownside"; nostop = 1; stopper = 0; tiles = 0},/turf/space/transit/north/shuttlespace_ns15,/area) "cxQ" = (/obj/structure/flora/tree/pine,/turf/simulated/floor/holofloor{icon_state = "snow"},/area/holodeck/source_snowfield) -"cxR" = (/obj/structure/table/woodentable,/turf/simulated/floor/holofloor{icon_state = "grimy"; dir = 2},/area/holodeck/source_meetinghall) +"cxR" = (/obj/structure/table/holotable/wood,/turf/simulated/floor/holofloor{icon_state = "grimy"; dir = 2},/area/holodeck/source_meetinghall) "cxS" = (/turf/simulated/floor/holofloor{dir = 1; icon_state = "red"},/area/holodeck/source_basketball) "cxT" = (/obj/item/clothing/glasses/sunglasses,/turf/simulated/floor/beach/sand{tag = "icon-desert0"; icon_state = "desert0"},/area/holodeck/source_beach) "cxU" = (/obj/effect/step_trigger/thrower{affect_ghosts = 1; direction = 2; name = "thrower_throwdownside"; nostop = 1; stopper = 0; tiles = 0},/turf/space/transit/north/shuttlespace_ns14,/area) @@ -10757,12 +10757,12 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (1,1,2) = {" ctyctzctActBctCctDctEctFctyctGctHctIctJctKctLctMctEctDctHctActBctFctIctCctKctGctMctNctOctPctQctRctSctTctUctVctWctXctYctZcuacubcuccudcuecufcugcuhcuictUctVctWctXctYctZcuacubcuccudcujaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacukculculculculculcumculculculculculcumculculculculculcumculculculculculcumculculculculculcumculculculculculcumculculculculculcun -ctHcuocupcuqcurcuscutcuucuvcuwcuxcuycuzcuAcuBcuCcutcuscuxcupcuqcuucuycurcuAcuwctzctRctSctTcuDcuEcuFcuGctYcuHcuIcuJctNctOctPctQctRctSctTcuDcuEcuFcuGcuKcuHcuIcuJctNctOctPctQctRcuhcujaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacuLcuMcwscuMcuMcvscuOcvccvdcvccvdcvccuOcwddQcdQydQwcwdcuOcuTcvfcuTcvfcuTcuOcuUcuUcuUcuUcuUcuOcuVcvgcuVcvgcuVcuOcvHcvicvicvicvIcuZ From 936db263ef46b6c1b24f60104cc647201a31f7cc Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Wed, 26 Mar 2014 18:51:37 -0500 Subject: [PATCH 22/23] *NIX Log files part 2. CR+LF added to new lines, created a global variable log_end that can be used on newlines log_misc("blahblah...[log_end]\nMoreblahblah[log_end]") put [log_end] prior to any \n and it will show up correctly in windows. Also created log_misc() proc to log to diary, and removed a bunch of diary << stuff all over the place. --- code/__HELPERS/logging.dm | 44 ++++++++++++------- code/controllers/configuration.dm | 16 +++---- code/datums/helper_datums/getrev.dm | 2 +- code/game/jobs/whitelist.dm | 4 +- code/game/machinery/kitchen/gibber.dm | 2 +- code/modules/admin/IsBanned.dm | 4 +- code/modules/admin/ToRban.dm | 6 +-- code/modules/admin/admin_ranks.dm | 8 ++-- code/modules/admin/banjob.dm | 4 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/living/living.dm | 4 +- code/modules/scripting/IDE.dm | 4 +- .../scripting/Implementations/_Logic.dm | 14 +++--- code/world.dm | 10 ++--- 14 files changed, 68 insertions(+), 56 deletions(-) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index eec190c1c21..b551d86c753 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -1,24 +1,33 @@ //print an error message to world.log + + +// On Linux/Unix systems the line endings are LF, on windows it's CRLF, admins that don't use notepad++ +// will get logs that are one big line if the system is Linux and they are using notepad. This solves it by adding CR to every line ending +// in the logs. ascii character 13 = CR + +/var/global/log_end= world.system_type == UNIX ? ascii2text(13) : "" + + /proc/error(msg) - world.log << "## ERROR: [msg][world.system_type == UNIX ? ascii2text(13) :]" + world.log << "## ERROR: [msg][log_end]" //print a warning message to world.log /proc/warning(msg) - world.log << "## WARNING: [msg][world.system_type == UNIX ? ascii2text(13) :]" + world.log << "## WARNING: [msg][log_end]" //print a testing-mode debug message to world.log /proc/testing(msg) - world.log << "## TESTING: [msg][world.system_type == UNIX ? ascii2text(13) :]" + world.log << "## TESTING: [msg][log_end]" /proc/log_admin(text) admin_log.Add(text) if (config.log_admin) - diary << "\[[time_stamp()]]ADMIN: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]ADMIN: [text][log_end]" /proc/log_debug(text) if (config.log_debug) - diary << "\[[time_stamp()]]DEBUG: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]DEBUG: [text][log_end]" for(var/client/C in admins) if(C.prefs.toggles & CHAT_DEBUGLOGS) @@ -27,44 +36,47 @@ /proc/log_game(text) if (config.log_game) - diary << "\[[time_stamp()]]GAME: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]GAME: [text][log_end]" /proc/log_vote(text) if (config.log_vote) - diary << "\[[time_stamp()]]VOTE: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]VOTE: [text][log_end]" /proc/log_access(text) if (config.log_access) - diary << "\[[time_stamp()]]ACCESS: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]ACCESS: [text][log_end]" /proc/log_say(text) if (config.log_say) - diary << "\[[time_stamp()]]SAY: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]SAY: [text][log_end]" /proc/log_ooc(text) if (config.log_ooc) - diary << "\[[time_stamp()]]OOC: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]OOC: [text][log_end]" /proc/log_whisper(text) if (config.log_whisper) - diary << "\[[time_stamp()]]WHISPER: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]WHISPER: [text][log_end]" /proc/log_emote(text) if (config.log_emote) - diary << "\[[time_stamp()]]EMOTE: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]EMOTE: [text][log_end]" /proc/log_attack(text) if (config.log_attack) - diary << "\[[time_stamp()]]ATTACK: [text][world.system_type == UNIX ? ascii2text(13) :]" //Seperate attack logs? Why? FOR THE GLORY OF SATAN! + diary << "\[[time_stamp()]]ATTACK: [text][log_end]" //Seperate attack logs? Why? FOR THE GLORY OF SATAN! /proc/log_adminsay(text) if (config.log_adminchat) - diary << "\[[time_stamp()]]ADMINSAY: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]ADMINSAY: [text][log_end]" /proc/log_adminwarn(text) if (config.log_adminwarn) - diary << "\[[time_stamp()]]ADMINWARN: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]ADMINWARN: [text][log_end]" /proc/log_pda(text) if (config.log_pda) - diary << "\[[time_stamp()]]PDA: [text][world.system_type == UNIX ? ascii2text(13) :]" + diary << "\[[time_stamp()]]PDA: [text][log_end]" + +/proc/log_misc(text) + diary << "\[[time_stamp()]]MISC: [text][log_end]" diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 74d8b1d3df5..39f9a770a49 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -150,7 +150,7 @@ if (M.config_tag) if(!(M.config_tag in modes)) // ensure each mode is added only once - diary << "Adding game mode [M.name] ([M.config_tag]) to configuration.[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Adding game mode [M.name] ([M.config_tag]) to configuration.") src.modes += M.config_tag src.mode_names[M.config_tag] = M.name src.probabilities[M.config_tag] = M.probability @@ -362,9 +362,9 @@ if (prob_name in config.modes) config.probabilities[prob_name] = text2num(prob_value) else - diary << "Unknown game mode probability configuration definition: [prob_name].[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown game mode probability configuration definition: [prob_name].") else - diary << "Incorrect probability configuration definition: [prob_name] [prob_value].[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].") if("allow_random_events") config.allow_random_events = 1 @@ -484,11 +484,11 @@ config.cult_ghostwriter_req_cultists = value else - diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown setting in configuration: '[name]'") else if(type == "game_options") if(!value) - diary << "Unknown value for setting [name] in [filename].[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown value for setting [name] in [filename].") value = text2num(value) switch(name) @@ -529,7 +529,7 @@ if("limbs_can_break") config.limbs_can_break = value else - diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown setting in configuration: '[name]'") /datum/configuration/proc/loadsql(filename) // -- TLE var/list/Lines = file2list(filename) @@ -575,7 +575,7 @@ if ("enable_stat_tracking") sqllogging = 1 else - diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown setting in configuration: '[name]'") /datum/configuration/proc/loadforumsql(filename) // -- TLE var/list/Lines = file2list(filename) @@ -617,7 +617,7 @@ if ("authenticatedgroup") forum_authenticated_group = value else - diary << "Unknown setting in configuration: '[name]'[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Unknown setting in configuration: '[name]'") /datum/configuration/proc/pick_mode(mode_name) // I wish I didn't have to instance the game modes in order to look up diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index 8c298d0d806..c25133b4432 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -63,7 +63,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt") s_archive = s if(!revision) abort() - diary << "Revision info loaded succesfully[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Revision info loaded succesfully") return return abort() diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 2feb5254412..2aaad4bde64 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -26,7 +26,7 @@ var/list/whitelist = list() /proc/load_alienwhitelist() var/text = file2text("config/alienwhitelist.txt") if (!text) - diary << "Failed to load config/alienwhitelist.txt\n" + log_misc("Failed to load config/alienwhitelist.txt") else alien_whitelist = text2list(text, "\n") @@ -51,4 +51,4 @@ var/list/whitelist = list() return 0 -#undef WHITELISTFILE \ No newline at end of file +#undef WHITELISTFILE diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index b0861395f52..4b2fce70cd8 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -30,7 +30,7 @@ break if(!input_plate) - diary << "a [src] didn't find an input plate." + log_misc("a [src] didn't find an input plate.") return Bumped(var/atom/A) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 4f0c356dc57..9548c279a08 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -34,8 +34,8 @@ world/IsBanned(key,address,computer_id) var/ckeytext = ckey(key) if(!establish_db_connection()) - world.log << "Ban database connection failure. Key [ckeytext] not checked" - diary << "Ban database connection failure. Key [ckeytext] not checked" + error("Ban database connection failure. Key [ckeytext] not checked") + log_misc("Ban database connection failure. Key [ckeytext] not checked") return var/failedcid = 1 diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm index 1018f074fef..efa835b25e0 100644 --- a/code/modules/admin/ToRban.dm +++ b/code/modules/admin/ToRban.dm @@ -22,7 +22,7 @@ /proc/ToRban_update() spawn(0) - diary << "Downloading updated ToR data...[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Downloading updated ToR data...") var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses") var/list/rawlist = file2list(http["CONTENT"]) @@ -36,10 +36,10 @@ if(!cleaned) continue F[cleaned] << 1 F["last_update"] << world.realtime - diary << "ToR data updated![world.system_type == UNIX ? ascii2text(13) :]" + log_misc("ToR data updated!") if(usr) usr << "ToRban updated." return 1 - diary << "ToR data update aborted: no data.[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("ToR data update aborted: no data.") return 0 /client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 86624e0bd2e..5e8af02474e 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -103,8 +103,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights establish_db_connection() if(!dbcon.IsConnected()) - world.log << "Failed to connect to database in load_admins(). Reverting to legacy system." - diary << "Failed to connect to database in load_admins(). Reverting to legacy system." + error("Failed to connect to database in load_admins(). Reverting to legacy system.") + log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.") config.admin_legacy_system = 1 load_admins() return @@ -123,8 +123,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights //find the client for a ckey if they are connected and associate them with the new admin datum D.associate(directory[ckey]) if(!admin_datums) - world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system." - diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system." + error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.") + log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.") config.admin_legacy_system = 1 load_admins() return diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index e797f52cc1e..7819c9a5822 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -66,8 +66,8 @@ DEBUG log_admin("jobban_keylist was empty") else if(!establish_db_connection()) - world.log << "Database connection failed. Reverting to the legacy ban system.[world.system_type == UNIX ? ascii2text(13) :]" - diary << "Database connection failed. Reverting to the legacy ban system.[world.system_type == UNIX ? ascii2text(13) :]" + error("Database connection failed. Reverting to the legacy ban system.") + log_misc("Database connection failed. Reverting to the legacy ban system.") config.ban_legacy_system = 1 jobban_loadbanfile() return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index aeb78fdeca0..9e75b94987f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1096,7 +1096,7 @@ var/tdamage = 0 var/ticks = 0 while (germs < 2501 && ticks < 100000 && round(damage/10)*20) - diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]" + log_misc("VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]") ticks++ if (prob(round(damage/10)*20)) germs++ diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7827363dae7..8e537e71ca3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -356,8 +356,8 @@ return else if(Debug) - diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" + log_debug("pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]") + log_debug("REPORT THIS") ///// if(pulling && pulling.anchored) diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm index b9b53b274d2..fbaf7ed06f7 100644 --- a/code/modules/scripting/IDE.dm +++ b/code/modules/scripting/IDE.dm @@ -10,7 +10,7 @@ client/verb/tcssave() var/obj/machinery/telecomms/server/Server = Machine.SelectedServer var/tcscode=winget(src, "tcscode", "text") var/msg="[mob.name] is adding script to server [Server]: [tcscode]" - diary << msg + log_misc(msg) message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)",0,1) Server.setcode( tcscode ) // this actually saves the code from input to the server src << output(null, "tcserror") // clear the errors @@ -208,4 +208,4 @@ client/verb/tcsclearmem() src << output("Failed to clear memory: Unable to locate machine.", "tcserror") else src << output(null, "tcserror") - src << output("Failed to clear memory: Unable to locate machine.", "tcserror") \ No newline at end of file + src << output("Failed to clear memory: Unable to locate machine.", "tcserror") diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm index af422c4f04c..b539fbc057a 100644 --- a/code/modules/scripting/Implementations/_Logic.dm +++ b/code/modules/scripting/Implementations/_Logic.dm @@ -257,7 +257,7 @@ proc/n_inrange(var/num, var/min=-1, var/max=1) var/list/dat = list() while (i < lenh) var/found = findtext(haystack, a, i, 0) - //diary << "findtext([haystack], [a], [i], 0)=[found]" + //log_misc("findtext([haystack], [a], [i], 0)=[found]") if (found == 0) // Not found break else @@ -265,9 +265,9 @@ proc/n_inrange(var/num, var/min=-1, var/max=1) dat+=found count+=1 else - //diary << "Script found [a] [count] times, aborted" + //log_misc("Script found [a] [count] times, aborted") break - //diary << "Found [a] at [found]! Moving up..." + //log_misc("Found [a] at [found]! Moving up...") i = found + lena if (count == 0) return haystack @@ -281,11 +281,11 @@ proc/n_inrange(var/num, var/min=-1, var/max=1) //CharCopy (dest + targetIndex, src + sourceIndex, count); //CharCopy (dest + curPos, source + lastReadPos, precopy); buf+=copytext(haystack,lastReadPos,precopy) - diary << "buf+=copytext([haystack],[lastReadPos],[precopy])" - diary<<"[buf]" + log_misc("buf+=copytext([haystack],[lastReadPos],[precopy])") + log_misc("[buf]") lastReadPos = dat[i] + lena //CharCopy (dest + curPos, replace, newValue.length); buf+=b - diary<<"[buf]" + log_misc("[buf]") buf+=copytext(haystack,lastReadPos, 0) - return buf \ No newline at end of file + return buf diff --git a/code/world.dm b/code/world.dm index babfdf9c361..4793e47c166 100644 --- a/code/world.dm +++ b/code/world.dm @@ -14,8 +14,8 @@ href_logfile = file("data/logs/[date_string] hrefs.htm") diary = file("data/logs/[date_string].log") diaryofmeanpeople = file("data/logs/[date_string] Attack.log") - diary << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------[world.system_type == UNIX ? ascii2text(13) :]" - diaryofmeanpeople << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][world.system_type == UNIX ? ascii2text(13) :]\n---------------------" + diary << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]" + diaryofmeanpeople << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]" changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently if(byond_version < RECOMMENDED_VERSION) @@ -67,7 +67,7 @@ // ..() /world/Topic(T, addr, master, key) - diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][world.system_type == UNIX ? ascii2text(13) :]" + diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]" if (T == "ping") var/x = 1 @@ -147,7 +147,7 @@ if(Lines.len) if(Lines[1]) master_mode = Lines[1] - diary << "Saved mode is '[master_mode]'[world.system_type == UNIX ? ascii2text(13) :]" + log_misc("Saved mode is '[master_mode]'") /world/proc/save_mode(var/the_mode) var/F = file("data/mode.txt") @@ -181,7 +181,7 @@ if(config.admin_legacy_system) var/text = file2text("config/moderators.txt") if (!text) - diary << "Failed to load config/mods.txt[world.system_type == UNIX ? ascii2text(13) :]" + error("Failed to load config/mods.txt") else var/list/lines = text2list(text, "\n") for(var/line in lines) From ac923649eb82c627448f364488680965a3ad4aeb Mon Sep 17 00:00:00 2001 From: Furlucis Date: Thu, 27 Mar 2014 02:16:38 -0400 Subject: [PATCH 23/23] Allows AIs to use hazardlocks I am absolutely certain that there is a better way to do this. Someone else can do it, I'm just making it work. --- code/game/machinery/doors/firedoor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 3fd77b8b34b..05a5fc13241 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -98,7 +98,7 @@ "\The [src]", "Yes, [density ? "open" : "close"]", "No") if(answer == "No") return - if(user.stat || !user.canmove || user.stunned || user.weakened || user.paralysis || get_dist(src, user) > 1) + if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user))) user << "Sorry, you must remain able bodied and close to \the [src] in order to use it." return