From 8a03f8892348fedf734c5a428178aaaa64c3910f Mon Sep 17 00:00:00 2001 From: DZD Date: Tue, 13 Jan 2015 22:24:13 -0500 Subject: [PATCH 1/3] Minor Slime Additions - Injecting slimes with plasma will increase their chance of mutating, up to 50%. - Injecting slimes with inaprovaline will decrease their chance of mutating, this can reach 0%. - Injecting a grey slime core with water will produce inaprovaline inside the core. - You can feed slimes plasma bars to make them more friendly, this does NOT work the same way as pink slime extracts, but rather like feeding them a monkey and punching the monkey to unconsciousness. - Adds gold slime core + blood reaction, will spawn a mob that plasma + gold core reactions normally spawn, but the mob will not be hostile. This does not prevent space bears from becoming VERY pissed off if you pet them. All shamelessly ~~open source stolen (thefted?)~~ ported from /tg/. --- .../modules/mob/living/carbon/metroid/life.dm | 7 +- .../mob/living/carbon/metroid/metroid.dm | 15 ++++- code/modules/reagents/Chemistry-Recipes.dm | 65 +++++++++++++++++++ 3 files changed, 83 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index d57940852f6..f1aa5bea66b 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -182,7 +182,12 @@ /mob/living/carbon/slime/proc/handle_chemicals_in_body() if(reagents) reagents.metabolize(src) - + if (reagents.get_reagent_amount("plasma")>=5) + mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50% + reagents.remove_reagent("plasma", 5) + if (reagents.get_reagent_amount("inaprovaline")>=5) + mutation_chance = max(mutation_chance - 5,0) //Prevents muation chance going <0% + reagents.remove_reagent("inaprovaline", 5) src.updatehealth() return //TODO: DEFERRED diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index b7146e208a4..cb5be464681 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -534,14 +534,23 @@ return /mob/living/carbon/slime/attackby(obj/item/W, mob/user) - if(W.force > 0) + if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma. + if (user in Friends) + ++Friends[user] + else + Friends[user] = 1 + user << "You feed the slime the plasma. It chirps happily." + var/obj/item/stack/sheet/mineral/plasma/S = W + S.use(1) + return + else if(W.force > 0) attacked += 10 if(prob(25)) user << "[W] passes right through [src]!" return if(Discipline && prob(50)) // wow, buddy, why am I getting attacked?? Discipline = 0 - if(W.force >= 3) + else if(W.force >= 3) if(is_adult) if(prob(5 + round(W.force/2))) if(Victim || Target) @@ -613,7 +622,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 Target = null ++Discipline return - + /mob/living/carbon/slime/can_use_vents() if(Victim) return "You cannot ventcrawl while feeding." diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 6a38b825a35..500703563e8 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1032,6 +1032,18 @@ datum S.loc = get_turf_loc(holder.my_atom) + slimeinaprov + name = "Slime Inaprovaline" + id = "m_inaprov" + result = "inaprovaline" + required_reagents = list("water" = 5) + result_amount = 3 + required_other = 1 + required_container = /obj/item/slime_extract/grey + on_reaction(var/datum/reagents/holder) + feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + + slimemonkey name = "Slime Monkey" id = "m_monkey" @@ -1119,6 +1131,59 @@ datum // for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null)) // O.show_message(text("\red The slime core fizzles disappointingly,"), 1) + + slimecritlesser + name = "Slime Crit Lesser" + id = "m_tele3" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required_container = /obj/item/slime_extract/gold + required_other = 1 + on_reaction(var/datum/reagents/holder) + feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + for(var/mob/O in viewers(get_turf(holder.my_atom), null)) + O.show_message(text("The slime extract begins to vibrate violently !"), 1) + spawn(50) + + if(holder && holder.my_atom) + + var/blocked = list(/mob/living/simple_animal/hostile, + /mob/living/simple_animal/hostile/pirate, + /mob/living/simple_animal/hostile/pirate/ranged, + /mob/living/simple_animal/hostile/russian, + /mob/living/simple_animal/hostile/russian/ranged, + /mob/living/simple_animal/hostile/syndicate, + /mob/living/simple_animal/hostile/syndicate/melee, + /mob/living/simple_animal/hostile/syndicate/melee/space, + /mob/living/simple_animal/hostile/syndicate/ranged, + /mob/living/simple_animal/hostile/syndicate/ranged/space, + /mob/living/simple_animal/hostile/alien/queen/large, + /mob/living/simple_animal/hostile/retaliate, + /mob/living/simple_animal/hostile/retaliate/clown, + /mob/living/simple_animal/hostile/mushroom, + /mob/living/simple_animal/hostile/asteroid, + /mob/living/simple_animal/hostile/asteroid/basilisk, + /mob/living/simple_animal/hostile/asteroid/goldgrub, + /mob/living/simple_animal/hostile/asteroid/goliath, + /mob/living/simple_animal/hostile/asteroid/hivelord, + /mob/living/simple_animal/hostile/asteroid/hivelordbrood, + /mob/living/simple_animal/hostile/carp/holocarp, + /mob/living/simple_animal/hostile/mining_drone + )//exclusion list for things you don't want the reaction to create. + var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs + + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + + for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) + if(M:eyecheck() <= 0) + flick("e_flash", M.flash) + + var/chosen = pick(critters) + var/mob/living/simple_animal/hostile/C = new chosen + C.faction |= "neutral" + C.loc = get_turf(holder.my_atom) + //Silver slimebork name = "Slime Bork" From ebfe5eea920f894bd768a1bbb9832431d49fd717 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 14 Jan 2015 06:19:01 +0100 Subject: [PATCH 2/3] R&D fix --- code/modules/research/designs/bluespace_designs.dm | 11 +++++++++++ code/modules/research/designs/equipment_designs.dm | 2 +- code/modules/research/designs/machine_designs.dm | 6 +++--- code/modules/research/designs/medical_designs.dm | 11 ----------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index e223e6223b7..1a3711b3f3e 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -22,6 +22,17 @@ reliability_base = 80 build_path = /obj/item/weapon/storage/backpack/holding category = list("Bluespace") + +/datum/design/bluespacebeaker + name = "bluespace beaker" + desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." + id = "bluespacebeaker" + req_tech = list("bluespace" = 2, "materials" = 6) + build_type = PROTOLATHE + materials = list("$metal" = 3000, "$plasma" = 3000, "$diamond" = 500) + reliability_base = 76 + build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace + category = list("Medical") /datum/design/telesci_gps name = "GPS Device" diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm index c0d2e14f98c..cc29409afb4 100644 --- a/code/modules/research/designs/equipment_designs.dm +++ b/code/modules/research/designs/equipment_designs.dm @@ -24,7 +24,7 @@ /datum/design/night_vision_goggles name = "Night Vision Goggles" desc = "Goggles that let you see through darkness unhindered." - id = "night_visision_goggles" + id = "night_vision_goggles" req_tech = list("magnets" = 4) build_type = PROTOLATHE materials = list("$metal" = 100, "$glass" = 100, "$uranium" = 1000) diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 3d0dfd1a923..41ae598a7ce 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -55,7 +55,7 @@ /datum/design/bodyscanner name = "Machine Board (Body Scanner)" desc = "Allows for the construction of circuit boards used to build a Body Scanner." - id = "sleeper" + id = "bodyscanner" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3) build_type = IMPRINTER materials = list("$glass" = 1000, "sacid" = 20) @@ -65,7 +65,7 @@ /datum/design/sleep_console name = "Machine Board (Body Scanner Console)" desc = "Allows for the construction of circuit boards used to build a Body Scanner Console." - id = "sleeper" + id = "bodyscanner_console" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3) build_type = IMPRINTER materials = list("$glass" = 1000, "sacid" = 20) @@ -125,7 +125,7 @@ /datum/design/sleep_console name = "Machine Board (Sleeper Console)" desc = "Allows for the construction of circuit boards used to build a Sleeper Console." - id = "sleeper" + id = "sleeper_console" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3) build_type = IMPRINTER materials = list("$glass" = 1000, "sacid" = 20) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 4365fa81f73..3c4469f1859 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -23,17 +23,6 @@ build_path = /obj/item/device/reagent_scanner/adv category = list("Medical") -/datum/design/bluespacebeaker - name = "bluespace beaker" - desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." - id = "bluespacebeaker" - req_tech = list("bluespace" = 2, "materials" = 6) - build_type = PROTOLATHE - materials = list("$metal" = 3000, "$plasma" = 3000, "$diamond" = 500) - reliability_base = 76 - build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace - category = list("Medical") - /datum/design/implant_chem name = "Chemical Implant" desc = "An implant which can be filled with various chemicals, and then injected on command." From 674851a7601db0bfc7611939d74e7acf62177aeb Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 14 Jan 2015 01:17:32 -0500 Subject: [PATCH 3/3] Doors --- code/game/machinery/doors/airlock.dm | 60 ++++++++++++++-------------- code/game/machinery/doors/door.dm | 48 ++++++++++++++++------ code/game/machinery/doors/poddoor.dm | 23 ++++++----- 3 files changed, 80 insertions(+), 51 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 24076937260..9ec64ff61c5 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -284,23 +284,23 @@ name = "Secure Armory Airlock" hackProof = 1 aiControlDisabled = 1 - + /obj/machinery/door/airlock/alien name = "Alien Airlock" desc = "A mysterious alien airlock with a complicated opening mechanism." hackProof = 1 icon = 'icons/obj/doors/Doorplasma.dmi' - -/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob) + +/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob) if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user)) ..(user) else user << "You do not know how to operate this airlock's mechanism." return - + /obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob) if(isalien(user) || isrobot(user) || isAI(user)) - ..(C, user) + ..(C, user) else user << "You do not know how to operate this airlock's mechanism." return @@ -512,8 +512,8 @@ About the new airlock wires panel: if(src.emergency) t1 += text("Emergency Access Override is enabled. Disable?
\n", src) else - t1 += text("Emergency Access Override is disabled. Enable?
\n", src) - + t1 += text("Emergency Access Override is disabled. Enable?
\n", src) + if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) t1 += text("Main Power Input wire is cut.
\n") if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)) @@ -1094,28 +1094,9 @@ About the new airlock wires panel: if(locate(/mob/living) in turf) // playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete spawn (60) - close() + autoclose() return - for(var/turf/turf in locs) - for(var/mob/living/M in turf) - if(isrobot(M)) - M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) - else - M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) - M.SetStunned(5) - M.SetWeakened(5) - var/obj/effect/stop/S - S = new /obj/effect/stop - S.victim = M - S.loc = M.loc - spawn(20) - del(S) - M.emote("scream") - var/turf/location = src.loc - if(istype(location, /turf/simulated)) - location.add_blood(M) - use_power(50) if(forced) playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1) @@ -1131,7 +1112,28 @@ About the new airlock wires panel: if (W) W.destroy() - ..() + if(density) + return 1 + operating = 1 + door_animate("closing") + src.layer = 3.1 + sleep(5) + src.density = 1 + if(!safe) + crush() + sleep(5) + update_icon() + if(visible && !glass) + SetOpacity(1) + operating = 0 + update_nearby_tiles() + if(locate(/mob/living) in get_turf(src)) + open() + + //I shall not add a check every x ticks if a door has closed over some fire. + var/obj/fire/fire = locate() in loc + if(fire) + del fire return /obj/machinery/door/airlock/proc/lock(var/forced=0) @@ -1230,7 +1232,7 @@ About the new airlock wires panel: return else return - + /obj/machinery/door/airlock/CanAStarPass(var/obj/item/weapon/card/id/ID) //Airlock is passable if it is open (!density), bot has access, and is not bolted shut) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 2aefc60be27..88d72fbf8b9 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -227,24 +227,27 @@ /obj/machinery/door/proc/open() - if(!density) return 1 - if(operating > 0) return - if(!ticker) return 0 + if(!density) + return 1 + if(operating > 0) + return + if(!ticker) + return 0 if(!operating) operating = 1 door_animate("opening") icon_state = "door0" src.SetOpacity(0) - sleep(10) - src.layer = 2.7 + sleep(5) src.density = 0 + sleep(5) + src.layer = 2.7 explosion_resistance = 0 update_icon() SetOpacity(0) + operating = 0 update_nearby_tiles() - if(operating) operating = 0 - if(autoclose && normalspeed) spawn(150) autoclose() @@ -256,15 +259,18 @@ /obj/machinery/door/proc/close() - if(density) return 1 - if(operating > 0) return + if(density) + return 1 + if(operating > 0) + return operating = 1 door_animate("closing") - src.density = 1 explosion_resistance = initial(explosion_resistance) - src.layer = 3.0 - sleep(10) + src.layer = 3.1 + sleep(5) + src.density = 1 + sleep(5) update_icon() if(visible && !glass) SetOpacity(1) //caaaaarn! @@ -277,6 +283,24 @@ del fire return +/obj/machinery/door/proc/crush() + for(var/mob/living/L in get_turf(src)) + if(isalien(L)) //For xenos + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans. + L.emote("roar") + else if(ishuman(L)) //For humans + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE) + L.emote("scream") + L.Weaken(5) + else if(ismonkey(L)) //For monkeys + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE) + L.Weaken(5) + else //for simple_animals & borgs + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE) + var/turf/location = src.loc + if(istype(location, /turf/simulated)) //add_blood doesn't work for borgs/xenos, but add_blood_floor does. + location.add_blood(L) + /obj/machinery/door/proc/requiresID() return 1 diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index bad76ca8ef0..eeceaf2de18 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -14,7 +14,7 @@ /obj/machinery/door/poddoor/four_tile_ver/ name = "Large Pod Door" icon = 'icons/obj/doors/1x4blast_vert.dmi' - + /obj/machinery/door/poddoor/three_tile_ver/ name = "Large Pod Door" icon = 'icons/obj/doors/1x3blast_vert.dmi' @@ -51,8 +51,9 @@ flick("pdoorc0", src) src.icon_state = "pdoor0" src.SetOpacity(0) - sleep(10) + sleep(5) src.density = 0 + sleep(5) update_nearby_tiles() if(operating == 1) //emag again @@ -68,11 +69,13 @@ src.operating = 1 flick("pdoorc1", src) src.icon_state = "pdoor1" - src.density = 1 src.SetOpacity(initial(opacity)) update_nearby_tiles() + sleep(5) + crush() + src.density = 1 + sleep(5) - sleep(10) src.operating = 0 return @@ -153,7 +156,7 @@ spawn(150) autoclose() return 1 - + /obj/machinery/door/poddoor/three_tile_hor/close() if (src.operating) return @@ -332,7 +335,7 @@ sleep(10) src.operating = 0 - return + return /obj/machinery/door/poddoor/four_tile_ver/open() if (src.operating == 1) //doors can still open when emag-disabled @@ -364,7 +367,7 @@ spawn(150) autoclose() return 1 - + /obj/machinery/door/poddoor/four_tile_ver/close() if (src.operating) return @@ -454,7 +457,7 @@ del f2 del f3 ..() - + /obj/machinery/door/poddoor/three_tile_ver var/obj/machinery/door/poddoor/filler_object/f1 var/obj/machinery/door/poddoor/filler_object/f2 @@ -477,8 +480,8 @@ del f1 del f2 del f3 - ..() - + ..() + /obj/machinery/door/poddoor/four_tile_hor var/obj/machinery/door/poddoor/filler_object/f1 var/obj/machinery/door/poddoor/filler_object/f2