diff --git a/baystation12.dme b/baystation12.dme index 53bceb1117..586f183ae0 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -477,6 +477,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/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm new file mode 100644 index 0000000000..32aafb21cd --- /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 13c73fbab1..cfbf024eda 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/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 101af1d94f..4138c1454b 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/html/changelog.html b/html/changelog.html index 8d999fd9ec..5b3f43d174 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,42 @@ -->
+

23 April 2015

+

Dennok updated:

+ +

PsiOmegaDelta updated:

+ +

Yoshax updated:

+ +

18 April 2015

PsiOmegaDelta updated: