diff --git a/baystation12.dme b/baystation12.dme index f0f28d7b613..fb23119bd30 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -328,6 +328,7 @@ #include "code\game\machinery\bioprinter.dm" #include "code\game\machinery\bluespacerelay.dm" #include "code\game\machinery\buttons.dm" +#include "code\game\machinery\CableLayer.dm" #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" #include "code\game\machinery\constructable_frame.dm" @@ -338,6 +339,7 @@ #include "code\game\machinery\doppler_array.dm" #include "code\game\machinery\flasher.dm" #include "code\game\machinery\floodlight.dm" +#include "code\game\machinery\floorlayer.dm" #include "code\game\machinery\hologram.dm" #include "code\game\machinery\holosign.dm" #include "code\game\machinery\igniter.dm" @@ -476,6 +478,7 @@ #include "code\game\machinery\kitchen\smartfridge.dm" #include "code\game\machinery\pipe\construction.dm" #include "code\game\machinery\pipe\pipe_dispenser.dm" +#include "code\game\machinery\pipe\pipelayer.dm" #include "code\game\machinery\telecomms\broadcaster.dm" #include "code\game\machinery\telecomms\logbrowser.dm" #include "code\game\machinery\telecomms\machine_interactions.dm" diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 5c0324a3e92..ae38249956a 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -226,6 +226,31 @@ /proc/capitalize(var/t as text) return uppertext(copytext(t, 1, 2)) + copytext(t, 2) +//This proc strips html properly, remove < > and all text between +//for complete text sanitizing should be used sanitize() +/proc/strip_html_properly(var/input) + if(!input) + return + var/opentag = 1 //These store the position of < and > respectively. + var/closetag = 1 + while(1) + opentag = findtext(input, "<") + closetag = findtext(input, ">") + if(closetag && opentag) + if(closetag < opentag) + input = copytext(input, (closetag + 1)) + else + input = copytext(input, 1, opentag) + copytext(input, (closetag + 1)) + else if(closetag || opentag) + if(opentag) + input = copytext(input, 1, opentag) + else + input = copytext(input, (closetag + 1)) + else + break + + return input + //This proc fills in all spaces with the "replace" var (* by default) with whatever //is in the other string at the same spot (assuming it is not a replace char). //This is used for fingerprints diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index e27eeb1caf9..d827a3a65e7 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -62,7 +62,7 @@ usr.client.debug_variables(antag) message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.") -/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano")) +/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Ticker Process","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano")) set category = "Debug" set name = "Debug Controller" set desc = "Debug the various periodic loop controllers for the game (be careful!)" @@ -78,6 +78,9 @@ if("Ticker") debug_variables(ticker) feedback_add_details("admin_verb","DTicker") + if("Ticker Process") + debug_variables(tickerProcess) + feedback_add_details("admin_verb","DTickerProcess") if("Lighting") debug_variables(lighting_controller) feedback_add_details("admin_verb","DLighting") diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index 372556c2051..302c6e9c9c2 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -27,7 +27,7 @@ var/datum/antagonist/rogue_ai/malf hacked_apcs |= apc /datum/antagonist/rogue_ai/proc/update_takeover_time() - hack_time -= ((hacked_apcs.len/6)*tickerProcess.getLastTickerTimeDuration()) + hack_time -= ((hacked_apcs.len/6)*2.0) /datum/antagonist/rogue_ai/tick() if(revealed && hacked_apcs.len >= 3) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index a72b06852a1..21168be5bc8 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -56,7 +56,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/air_doors_activated = 0 var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') var/sound/forced_ambience = null - + var/sound_env = 2 //reverb preset for sounds played in this area, see sound datum reference for more /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ var/list/teleportlocs = list() @@ -808,6 +808,9 @@ area/space/atmosalert() //Hallway +/area/hallway/primary/ + sound_env = 12 //hallway + /area/hallway/primary/fore name = "\improper Fore Primary Hallway" icon_state = "hallF" diff --git a/code/game/area/asteroid_areas.dm b/code/game/area/asteroid_areas.dm index edfb99f57f6..12ae5377ce2 100644 --- a/code/game/area/asteroid_areas.dm +++ b/code/game/area/asteroid_areas.dm @@ -3,6 +3,7 @@ /area/mine icon_state = "mining" music = 'sound/ambience/song_game.ogg' + sound_env = 5 //stoneroom /area/mine/explored name = "Mine" diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm new file mode 100644 index 00000000000..9bad67df7dc --- /dev/null +++ b/code/game/machinery/CableLayer.dm @@ -0,0 +1,126 @@ +/obj/machinery/cablelayer + name = "automatic cable layer" + + icon = 'icons/obj/stationobjs.dmi' + icon_state = "pipe_d" + density = 1 + var/obj/structure/cable/last_piece + var/obj/item/stack/cable_coil/cable + var/max_cable = 100 + var/on = 0 + +/obj/machinery/cablelayer/New() + cable = new(src) + cable.amount = 100 + ..() + +/obj/machinery/cablelayer/Move(new_turf,M_Dir) + ..() + layCable(new_turf,M_Dir) + +/obj/machinery/cablelayer/attack_hand(mob/user as mob) + if(!cable&&!on) + user << "\The [src] don't work with no cable." + return + on=!on + user.visible_message("\The [src] [!on?"dea":"a"]ctivated.", "[user] [!on?"dea":"a"]ctivated \the [src].") + return + +/obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(istype(O, /obj/item/stack/cable_coil)) + + var/result = load_cable(O) + if(!result) + user << "Reel is full." + else + user << "[result] meters of cable successfully loaded." + return + + if(istype(O, /obj/item/weapon/screwdriver)) + if(cable && cable.amount) + var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1) + m = min(m, cable.amount) + m = min(m, 30) + if(m) + use_cable(m) + var/obj/item/stack/cable_coil/CC = new (get_turf(src)) + CC.amount = m + else + usr << "There's no more cable on the reel." + +/obj/machinery/cablelayer/examine(mob/user) + ..() + user << "\The [src] has [cable.amount] meter\s." + +/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC) + if(istype(CC) && CC.amount) + var/cur_amount = cable? cable.amount : 0 + var/to_load = max(max_cable - cur_amount,0) + if(to_load) + to_load = min(CC.amount, to_load) + if(!cable) + cable = new(src) + cable.amount = 0 + cable.amount += to_load + CC.use(to_load) + return to_load + else + return 0 + return + +/obj/machinery/cablelayer/proc/use_cable(amount) + if(!cable || cable.amount<1) + visible_message("Cable depleted, [src] deactivated.") + return +/* if(cable.amount < amount) + visible_message("No enough cable to finish the task.") + return*/ + cable.use(amount) + return 1 + +/obj/machinery/cablelayer/proc/reset() + last_piece = null + +/obj/machinery/cablelayer/proc/dismantleFloor(var/turf/new_turf) + if(istype(new_turf, /turf/simulated/floor)) + var/turf/simulated/floor/T = new_turf + if(!T.is_plating()) + if(!T.broken && !T.burnt) + new T.floor_type(T) + T.make_plating() + return !new_turf.intact + +/obj/machinery/cablelayer/proc/layCable(var/turf/new_turf,var/M_Dir) + if(!on) + return reset() + else + dismantleFloor(new_turf) + if(!istype(new_turf) || !dismantleFloor(new_turf)) + return reset() + var/fdirn = turn(M_Dir,180) + for(var/obj/structure/cable/LC in new_turf) // check to make sure there's not a cable there already + if(LC.d1 == fdirn || LC.d2 == fdirn) + return reset() + if(!use_cable(1)) + return reset() + var/obj/structure/cable/NC = new(new_turf) + NC.cableColor("red") + NC.d1 = 0 + NC.d2 = fdirn + NC.updateicon() + + var/datum/powernet/PN + if(last_piece && last_piece.d2 != M_Dir) + last_piece.d1 = min(last_piece.d2, M_Dir) + last_piece.d2 = max(last_piece.d2, M_Dir) + last_piece.updateicon() + PN = last_piece.powernet + + if(!PN) + PN = new() + PN.add_cable(NC) + NC.mergeConnectedNetworks(NC.d2) + + //NC.mergeConnectedNetworksOnTurf() + last_piece = NC + return 1 diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm new file mode 100644 index 00000000000..009d1c7694e --- /dev/null +++ b/code/game/machinery/floorlayer.dm @@ -0,0 +1,114 @@ +/obj/machinery/floorlayer + + name = "automatic floor layer" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "pipe_d" + density = 1 + var/turf/old_turf + var/on = 0 + var/obj/item/stack/tile/T + var/list/mode = list("dismantle"=0,"laying"=0,"collect"=0) + +/obj/machinery/floorlayer/New() + T = new/obj/item/stack/tile/plasteel(src) + ..() + +/obj/machinery/floorlayer/Move(new_turf,M_Dir) + ..() + + if(on) + if(mode["dismantle"]) + dismantleFloor(old_turf) + + if(mode["laying"]) + layFloor(old_turf) + + if(mode["collect"]) + CollectTiles(old_turf) + + + old_turf = new_turf + +/obj/machinery/floorlayer/attack_hand(mob/user as mob) + on=!on + user.visible_message("[user] has [!on?"de":""]activated \the [src].", "You [!on?"de":""]activate \the [src].") + return + +/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) + + if (istype(W, /obj/item/weapon/wrench)) + var/m = input("Choose work mode", "Mode") as null|anything in mode + mode[m] = !mode[m] + var/O = mode[m] + user.visible_message("[usr] has set \the [src] [m] mode [!O?"off":"on"].", "You set \the [src] [m] mode [!O?"off":"on"].") + return + + if(istype(W, /obj/item/stack/tile)) + user << "\The [W] successfully loaded." + user.drop_item(T) + TakeTile(T) + return + + if(istype(W, /obj/item/weapon/crowbar)) + if(!length(contents)) + user << "\The [src] is empty." + else + var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents + if(E) + user << "You remove the [E] from /the [src]." + E.loc = src.loc + T = null + return + + if(istype(W, /obj/item/weapon/screwdriver)) + T = input("Choose tile type.", "Tiles") as null|anything in contents + return + ..() + +/obj/machinery/floorlayer/examine(mob/user) + ..() + var/dismantle = mode["dismantle"] + var/laying = mode["laying"] + var/collect = mode["collect"] + user << "\The [src] [!T?"don't ":""]has [!T?"":"[T.get_amount()] [T] "]tile\s, dismantle is [dismantle?"on":"off"], laying is [laying?"on":"off"], collect is [collect?"on":"off"]." + +/obj/machinery/floorlayer/proc/reset() + on=0 + return + +/obj/machinery/floorlayer/proc/dismantleFloor(var/turf/new_turf) + if(istype(new_turf, /turf/simulated/floor)) + var/turf/simulated/floor/T = new_turf + if(!T.is_plating()) + if(!T.broken && !T.burnt) + new T.floor_type(T) + T.make_plating() + return !new_turf.intact + +/obj/machinery/floorlayer/proc/TakeNewStack() + for(var/obj/item/stack/tile/tile in contents) + T = tile + return 1 + return 0 + +/obj/machinery/floorlayer/proc/SortStacks() + for(var/obj/item/stack/tile/tile1 in contents) + for(var/obj/item/stack/tile/tile2 in contents) + tile2.transfer_to(tile1) + +/obj/machinery/floorlayer/proc/layFloor(var/turf/w_turf) + if(!T) + if(!TakeNewStack()) + return 0 + w_turf.attackby(T , src) + return 1 + +/obj/machinery/floorlayer/proc/TakeTile(var/obj/item/stack/tile/tile) + if(!T) T = tile + tile.loc = src + + SortStacks() + +/obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf) + for(var/obj/item/stack/tile/tile in w_turf) + TakeTile(tile) diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm new file mode 100644 index 00000000000..32aafb21cd8 --- /dev/null +++ b/code/game/machinery/pipe/pipelayer.dm @@ -0,0 +1,137 @@ +/obj/machinery/pipelayer + + name = "automatic pipe layer" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "pipe_d" + density = 1 + var/turf/old_turf + var/old_dir + var/on = 0 + var/a_dis = 0 + var/P_type = 0 + var/P_type_t = "" + var/max_metal = 50 + var/metal = 10 + var/obj/item/weapon/wrench/W + var/list/Pipes = list("regular pipes"=0,"scrubbers pipes"=31,"supply pipes"=29,"heat exchange pipes"=2) + +/obj/machinery/pipelayer/New() + W = new(src) + ..() + +/obj/machinery/pipelayer/Move(new_turf,M_Dir) + ..() + + if(on && a_dis) + dismantleFloor(old_turf) + layPipe(old_turf,M_Dir,old_dir) + + old_turf = new_turf + old_dir = turn(M_Dir,180) + +/obj/machinery/pipelayer/attack_hand(mob/user as mob) + if(!metal&&!on) + user << "\The [src] doesn't work without metal." + return + on=!on + user.visible_message("[user] has [!on?"de":""]activated \the [src].", "You [!on?"de":""]activate \the [src].") + return + +/obj/machinery/pipelayer/attackby(var/obj/item/W as obj, var/mob/user as mob) + + if (istype(W, /obj/item/weapon/wrench)) + P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes + P_type = Pipes[P_type_t] + user.visible_message("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].") + return + + if(istype(W, /obj/item/weapon/crowbar)) + a_dis=!a_dis + user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.") + return + + if(istype(W, /obj/item/stack/sheet/metal)) + + var/result = load_metal(W) + if(isnull(result)) + user << "Unable to load [W] - no metal found." + else if(!result) + user << "\The [src] is full." + else + user.visible_message("[user] has loaded metal into \the [src].", "You load metal into \the [src]") + + return + + if(istype(W, /obj/item/weapon/screwdriver)) + if(metal) + var/m = round(input(usr,"Please specify the amount of metal to remove","Remove metal",min(round(metal),50)) as num, 1) + m = min(m, 50) + m = min(m, round(metal)) + m = round(m) + if(m) + use_metal(m) + var/obj/item/stack/sheet/metal/MM = new (get_turf(src)) + MM.amount = m + user.visible_message("[user] removes [m] sheet\s of metal from the \the [src].", "You remove [m] sheet\s of metal from \the [src]") + else + user << "\The [src] is empty." + return + ..() + +/obj/machinery/pipelayer/examine(mob/user) + ..() + user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated." + +/obj/machinery/pipelayer/proc/reset() + on=0 + return + +/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/sheet/metal/MM) + if(istype(MM) && MM.get_amount()) + var/cur_amount = metal + var/to_load = max(max_metal - round(cur_amount),0) + if(to_load) + to_load = min(MM.get_amount(), to_load) + metal += to_load + MM.use(to_load) + return to_load + else + return 0 + return + +/obj/machinery/pipelayer/proc/use_metal(amount) + if(!metal || metal= EVENT_LEVEL_MAJOR && prob(75)) strength = 2 @@ -24,7 +24,7 @@ datum/event/viral_infection/announce() level = pick("one", "two", "three", "four") else level = "five" - + if (severity == EVENT_LEVEL_MAJOR || prob(60)) command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') @@ -33,8 +33,10 @@ datum/event/viral_infection/start() var/list/candidates = list() //list of candidate keys for(var/mob/living/carbon/human/G in player_list) - if(G.client && G.stat != DEAD) - candidates += G + if(G.stat != DEAD && G.is_client_active(5)) + var/turf/T = get_turf(G) + if(T.z in config.station_levels) + candidates += G if(!candidates.len) return candidates = shuffle(candidates)//Incorporating Donkie's list shuffle diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index 13c73fbab11..cfbf024edaf 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -38,7 +38,7 @@ seed_name = "berry" display_name = "berry bush" mutants = list("glowberries","poisonberries") - chems = list("nutriment" = list(1,10), "berryjuice" = list(1,10)) + chems = list("nutriment" = list(1,10), "berryjuice" = list(10,10)) kitchen_tag = "berries" /datum/seed/berry/New() @@ -76,7 +76,7 @@ seed_name = "poison berry" display_name = "poison berry bush" mutants = list("deathberries") - chems = list("nutriment" = list(1), "toxin" = list(3,5), "poisonberryjuice" = list(3,5)) + chems = list("nutriment" = list(1), "toxin" = list(3,5), "poisonberryjuice" = list(10,5)) /datum/seed/berry/poison/New() ..() @@ -138,7 +138,7 @@ seed_name = "tomato" display_name = "tomato plant" mutants = list("bluetomato","bloodtomato") - chems = list("nutriment" = list(1,10), "tomatojuice" = list(1,10)) + chems = list("nutriment" = list(1,10), "tomatojuice" = list(10,10)) kitchen_tag = "tomato" /datum/seed/tomato/New() @@ -196,7 +196,7 @@ seed_name = "bluespace tomato" display_name = "bluespace tomato plant" mutants = null - chems = list("nutriment" = list(1,20), "singulo" = list(1,5)) + chems = list("nutriment" = list(1,20), "singulo" = list(10,5)) /datum/seed/tomato/blue/teleport/New() ..() @@ -544,7 +544,7 @@ seed_name = "grape" display_name = "grapevines" mutants = list("greengrapes") - chems = list("nutriment" = list(1,10), "sugar" = list(1,5), "grapejuice" = list(1,10)) + chems = list("nutriment" = list(1,10), "sugar" = list(1,5), "grapejuice" = list(10,10)) /datum/seed/grapes/New() ..() @@ -563,7 +563,7 @@ seed_name = "green grape" display_name = "green grapevines" mutants = null - chems = list("nutriment" = list(1,10), "kelotane" = list(3,5), "grapejuice" = list(1,10)) + chems = list("nutriment" = list(1,10), "kelotane" = list(3,5), "grapejuice" = list(10,10)) /datum/seed/grapes/green/New() ..() @@ -610,7 +610,7 @@ name = "banana" seed_name = "banana" display_name = "banana tree" - chems = list("banana" = list(1,10)) + chems = list("banana" = list(10,10)) trash_type = /obj/item/weapon/bananapeel kitchen_tag = "banana" @@ -648,7 +648,7 @@ name = "potato" seed_name = "potato" display_name = "potatoes" - chems = list("nutriment" = list(1,10), "potato" = list(1,10)) + chems = list("nutriment" = list(1,10), "potato" = list(10,10)) kitchen_tag = "potato" /datum/seed/potato/New() @@ -666,7 +666,7 @@ name = "soybean" seed_name = "soybean" display_name = "soybeans" - chems = list("nutriment" = list(1,20), "soymilk" = list(1,20)) + chems = list("nutriment" = list(1,20), "soymilk" = list(10,20)) kitchen_tag = "soybeans" /datum/seed/soybean/New() @@ -720,7 +720,7 @@ name = "carrot" seed_name = "carrot" display_name = "carrots" - chems = list("nutriment" = list(1,20), "imidazoline" = list(3,5), "carrotjuice" = list(1,20)) + chems = list("nutriment" = list(1,20), "imidazoline" = list(3,5), "carrotjuice" = list(10,20)) kitchen_tag = "carrot" /datum/seed/carrots/New() @@ -790,7 +790,7 @@ name = "watermelon" seed_name = "watermelon" display_name = "watermelon vine" - chems = list("nutriment" = list(1,6), "watermelonjuice" = list(1,6)) + chems = list("nutriment" = list(1,6), "watermelonjuice" = list(10,6)) /datum/seed/watermelon/New() ..() @@ -828,7 +828,7 @@ name = "lime" seed_name = "lime" display_name = "lime trees" - chems = list("nutriment" = list(1,20), "limejuice" = list(1,20)) + chems = list("nutriment" = list(1,20), "limejuice" = list(10,20)) kitchen_tag = "lime" /datum/seed/citrus/New() @@ -847,7 +847,7 @@ name = "lemon" seed_name = "lemon" display_name = "lemon trees" - chems = list("nutriment" = list(1,20), "lemonjuice" = list(1,20)) + chems = list("nutriment" = list(1,20), "lemonjuice" = list(10,20)) kitchen_tag = "lemon" /datum/seed/citrus/lemon/New() @@ -860,7 +860,7 @@ seed_name = "orange" display_name = "orange trees" kitchen_tag = "orange" - chems = list("nutriment" = list(1,20), "orangejuice" = list(1,20)) + chems = list("nutriment" = list(1,20), "orangejuice" = list(10,20)) /datum/seed/citrus/orange/New() ..() @@ -906,7 +906,7 @@ seed_name = "cherry" seed_noun = "pits" display_name = "cherry tree" - chems = list("nutriment" = list(1,15), "sugar" = list(1,15), "cherryjelly" = list(1,15)) + chems = list("nutriment" = list(1,15), "sugar" = list(1,15), "cherryjelly" = list(10,15)) kitchen_tag = "cherries" /datum/seed/cherries/New() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 568822d1051..6feb79f0b6e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -2,7 +2,7 @@ //NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick! #define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. -#define HUMAN_CRIT_MAX_OXYLOSS ( (tickerProcess.getLastTickerTimeDuration()) / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. +#define HUMAN_CRIT_MAX_OXYLOSS ( 2.0 / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. last_tick_duration = ~2.0 on average #define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point #define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 101af1d94f7..4138c1454b9 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -615,3 +615,7 @@ proc/is_blind(A) eyeobj.setLoc(C) return 1 + +// Returns true if the mob has a client which has been active in the last given X minutes. +/mob/proc/is_client_active(var/active = 1) + return client && client.inactivity < active MINUTES diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index cc50cfbde1e..b894bac182c 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -188,7 +188,7 @@ if(S.victim == mob) return - if(mob.stat==2) + if(mob.stat==DEAD && isliving(mob)) mob.ghostize() return diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index 1dd7a17e468..9b8557363da 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -8,6 +8,7 @@ var/last_burn = 0 var/list/last_movement = list(0,0) var/fore_dir = NORTH + var/rotate = 1 //For proc rotate var/obj/effect/map/current_sector var/obj/machinery/computer/helm/nav_control @@ -70,7 +71,7 @@ /obj/effect/map/ship/proc/get_brake_path() if(!get_acceleration()) return INFINITY - return max(abs(speed[1]),abs(speed[2]))/get_acceleration() + return get_speed()/get_acceleration() #define SIGN(X) (X == 0 ? 0 : (X > 0 ? 1 : -1)) /obj/effect/map/ship/proc/decelerate() @@ -94,13 +95,21 @@ if(direction & SOUTH) adjust_speed(0, -get_acceleration()) + +/obj/effect/map/ship/proc/rotate(var/direction) + var/matrix/M = matrix() + M.Turn(dir2angle(direction)) + src.transform = M //Rotate ship + /obj/effect/map/ship/process() if(!is_still()) var/list/deltas = list(0,0) for(var/i=1, i<=2, i++) - if(speed[i] && world.time > last_movement[i] + default_delay - speed[i]) + if(speed[i] && world.time > last_movement[i] + default_delay - abs(speed[i])) deltas[i] = speed[i] > 0 ? 1 : -1 last_movement[i] = world.time var/turf/newloc = locate(x + deltas[1], y + deltas[2], z) if(newloc) - Move(newloc) \ No newline at end of file + Move(newloc) + if(rotate) + rotate(get_heading()) diff --git a/html/changelog.html b/html/changelog.html index 8d999fd9ec8..308ecb672e2 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,50 @@ -->
+

24 April 2015

+

Dennok updated:

+ + +

23 April 2015

+

Dennok updated:

+ +

PsiOmegaDelta updated:

+ +

Yoshax updated:

+ +

18 April 2015

PsiOmegaDelta updated: