From a93db06afbd12bf914eea196e5e5b53186a3c976 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sat, 18 Aug 2012 21:32:21 +0100 Subject: [PATCH 1/2] Rebalanced sleepy pen, takes about 30 seconds to fall asleep, and 2 minutes total from stabbing to wear off. Fixes aliens, can no longer be pushed over by airflow, and all their powers work correctly. CentComm console has a 5 second cooldown now. --- code/ZAS/Airflow.dm | 6 ++++++ code/game/machinery/computer/communications.dm | 8 ++++---- code/game/objects/items.dm | 6 +++--- .../mob/living/carbon/alien/humanoid/alien_powers.dm | 4 +++- .../mob/living/carbon/alien/humanoid/caste/drone.dm | 2 +- .../mob/living/carbon/alien/humanoid/caste/sentinel.dm | 4 ++-- code/modules/mob/living/carbon/alien/humanoid/queen.dm | 2 +- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index fc9d44a8186..958d6e5df9b 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -53,6 +53,9 @@ mob/proc/airflow_stun() if(stat == 2) return 0 if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0 + if(!canstun || !canweaken) + src << "\blue You stay upright as the air rushes past you." + return 0 if(weakened <= 0) src << "\red The sudden rush of air knocks you over!" weakened = max(weakened,5) last_airflow_stun = world.time @@ -70,6 +73,9 @@ mob/living/carbon/human/airflow_stun() if(wear_suit.flags & SUITSPACE) return 0 if(shoes) if(shoes.flags & NOSLIP) return 0 + if(!canstun || !canweaken) + src << "\blue You stay upright as the air rushes past you." + return 0 if(weakened <= 0) src << "\red The sudden rush of air knocks you over!" weakened = max(weakened,rand(1,5)) last_airflow_stun = world.time diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index dcb6d69ed81..f0da4e744ec 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -195,8 +195,8 @@ usr << "Message transmitted." log_say("[key_name(usr)] has sent Centcomm a message: [input]") centcomm_message_cooldown = 1 - spawn(600)//One minute cooldown - message_cooldown = 0 + spawn(50)//One minute cooldown, nah 5 seconds + centcomm_message_cooldown = 0 // OMG SYNDICATE ...LETTERHEAD @@ -212,8 +212,8 @@ usr << "Message transmitted." log_say("[key_name(usr)] has sent the Syndicate a message: [input]") centcomm_message_cooldown = 1 - spawn(600)//One minute cooldown - message_cooldown = 0 + spawn(50)//One minute cooldown, nah 5 seconds + centcomm_message_cooldown = 0 if("RestoreBackup") usr << "Backup routing data restored!" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 13f63ec6c0e..abc81842222 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -255,10 +255,10 @@ return /obj/item/weapon/pen/sleepypen/New() - var/datum/reagents/R = new/datum/reagents(60) //Used to be 300 + var/datum/reagents/R = new/datum/reagents(18) //Used to be 300 reagents = R R.my_atom = src - R.add_reagent("stoxin", 60) + R.add_reagent("stoxin", 18) ..() return @@ -267,7 +267,7 @@ return ..() if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 20) //used to be 150 + if(M.reagents) reagents.trans_to(M, 6) //used to be 150, 6 gives around 2 minutes of knock out. return //NEW STYLE PARAPEN diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 61ca2c72c40..d9f58fa0104 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -85,6 +85,8 @@ I kind of like the right click only--the window version can get a little confusi M.show_message(text("\green [user] vomits globs of vile stuff all over [src]!"), 1) A.tick() +// This one is currently broken, however the other one isn't. And they both do the same thing. Weird. +/* /mob/living/carbon/alien/humanoid/proc/corrode_target() //Aliens only see items on the list of objects that they can actually spit on./N set name = "Spit Corrosive Acid (200)" set desc = "Drench an object in acid, destroying it over time." @@ -106,7 +108,7 @@ I kind of like the right click only--the window version can get a little confusi else src << "\green Target is too far away." return - +*/ /mob/living/carbon/alien/humanoid/verb/corrode(obj/O as anything in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N set name = "Corrode with Acid (200)" set desc = "Drench an object in acid, destroying it over time." diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm index ceb8536feab..9d8cba68ec7 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm @@ -6,7 +6,7 @@ src.name = text("alien drone ([rand(1, 1000)])") src.real_name = src.name spawn (1) - src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target +// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode src.verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers src.stand_icon = new /icon('alien.dmi', "aliend_s") src.lying_icon = new /icon('alien.dmi', "aliend_l") diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index cfb3606eb90..a218222b348 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -6,7 +6,7 @@ src.name = text("alien sentinel ([rand(1, 1000)])") src.real_name = src.name spawn (1) - src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target +// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode src.stand_icon = new /icon('alien.dmi', "aliens_s") src.lying_icon = new /icon('alien.dmi', "aliens_l") src.resting_icon = new /icon('alien.dmi', "aliens_sleep") @@ -182,5 +182,5 @@ A.current = U A.yo = U.y - T.y A.xo = U.x - T.x - A.process() + A.fired() return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index a4a620eb91b..2ef094a34d4 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -7,7 +7,7 @@ // src.name = text("alien ([rand(1, 1000)])") src.real_name = src.name spawn (1) - src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode_target +// src.verbs += /mob/living/carbon/alien/humanoid/proc/corrode src.verbs += /mob/living/carbon/alien/humanoid/sentinel/verb/spit src.verbs -= /mob/living/carbon/alien/humanoid/verb/ventcrawl src.stand_icon = new /icon('alien.dmi', "queen_s") From 08b2b326e9f7bfb3907762c46ed196cd1a1dc636 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Sun, 19 Aug 2012 01:59:53 +0100 Subject: [PATCH 2/2] Ores now stack when released from ore box. Should help reduce some mining lag. --- code/modules/mining/machine_processing.dm | 16 ++-- code/modules/mining/machine_unloading.dm | 42 ++++++++++ code/modules/mining/ores_materials_coins.dm | 1 + code/modules/mining/satchel_ore_box.dm | 87 ++++++++++++++++++++- 4 files changed, 137 insertions(+), 9 deletions(-) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 043fd387afd..016eba3cda8 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -362,35 +362,35 @@ O = locate(/obj/item, input.loc) if (O) if (istype(O,/obj/item/weapon/ore/iron)) - ore_iron++; + ore_iron = ore_iron + O:amount; del(O) continue if (istype(O,/obj/item/weapon/ore/glass)) - ore_glass++; + ore_glass = ore_glass + O:amount; del(O) continue if (istype(O,/obj/item/weapon/ore/diamond)) - ore_diamond++; + ore_diamond = ore_diamond + O:amount; del(O) continue if (istype(O,/obj/item/weapon/ore/plasma)) - ore_plasma++ + ore_plasma = ore_plasma + O:amount del(O) continue if (istype(O,/obj/item/weapon/ore/gold)) - ore_gold++ + ore_gold = ore_gold + O:amount del(O) continue if (istype(O,/obj/item/weapon/ore/silver)) - ore_silver++ + ore_silver = ore_silver + O:amount del(O) continue if (istype(O,/obj/item/weapon/ore/uranium)) - ore_uranium++ + ore_uranium = ore_uranium + O:amount del(O) continue if (istype(O,/obj/item/weapon/ore/clown)) - ore_clown++ + ore_clown = ore_clown + O:amount del(O) continue O.loc = src.output.loc diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index 2636806ca78..74760253ba5 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -27,6 +27,48 @@ if (src.output && src.input) if (locate(/obj/structure/ore_box, input.loc)) var/obj/structure/ore_box/BOX = locate(/obj/structure/ore_box, input.loc) + BOX.update() + if (BOX.amt_diamond > 0) + var/obj/item/weapon/ore/diamond/G = new /obj/item/weapon/ore/diamond + G.amount = BOX.amt_diamond + G.loc = output.loc + BOX.amt_diamond = 0 + if (BOX.amt_glass > 0) + var/obj/item/weapon/ore/glass/G = new /obj/item/weapon/ore/glass + G.amount = BOX.amt_glass + G.loc = output.loc + BOX.amt_glass = 0 + if (BOX.amt_plasma > 0) + var/obj/item/weapon/ore/plasma/G = new /obj/item/weapon/ore/plasma + G.amount = BOX.amt_plasma + G.loc = output.loc + BOX.amt_plasma = 0 + if (BOX.amt_iron > 0) + var/obj/item/weapon/ore/iron/G = new /obj/item/weapon/ore/iron + G.amount = BOX.amt_iron + G.loc = output.loc + BOX.amt_iron = 0 + if (BOX.amt_silver > 0) + var/obj/item/weapon/ore/silver/G = new /obj/item/weapon/ore/silver + G.amount = BOX.amt_silver + G.loc = output.loc + BOX.amt_silver = 0 + if (BOX.amt_gold > 0) + var/obj/item/weapon/ore/gold/G = new /obj/item/weapon/ore/gold + G.amount = BOX.amt_gold + G.loc = output.loc + BOX.amt_gold = 0 + if (BOX.amt_uranium > 0) + var/obj/item/weapon/ore/uranium/G = new /obj/item/weapon/ore/uranium + G.amount = BOX.amt_uranium + G.loc = output.loc + BOX.amt_uranium = 0 + if (BOX.amt_clown > 0) + var/obj/item/weapon/ore/clown/G = new /obj/item/weapon/ore/clown + G.amount = BOX.amt_clown + G.loc = output.loc + BOX.amt_clown = 0 + var/i = 0 for (var/obj/item/weapon/ore/O in BOX.contents) BOX.contents -= O diff --git a/code/modules/mining/ores_materials_coins.dm b/code/modules/mining/ores_materials_coins.dm index 9bf12b6abdf..e5b905cc5b4 100644 --- a/code/modules/mining/ores_materials_coins.dm +++ b/code/modules/mining/ores_materials_coins.dm @@ -4,6 +4,7 @@ name = "Rock" icon = 'Mining.dmi' icon_state = "ore" + var/amount = 1 /obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/modules/mining/satchel_ore_box.dm b/code/modules/mining/satchel_ore_box.dm index 342d26706a9..b01c8f1acc5 100644 --- a/code/modules/mining/satchel_ore_box.dm +++ b/code/modules/mining/satchel_ore_box.dm @@ -51,6 +51,14 @@ desc = "A heavy box used for storing ore." density = 1 var/capacity = 200 + var/amt_gold = 0 + var/amt_silver = 0 + var/amt_diamond = 0 + var/amt_glass = 0 + var/amt_iron = 0 + var/amt_plasma = 0 + var/amt_uranium = 0 + var/amt_clown = 0 New() if(prob(50)) @@ -69,9 +77,45 @@ user << "\blue You empty the satchel into the box." else user << "\blue The ore box is full." - return +/obj/structure/ore_box/proc/update(obj, mob/user as mob) + for (var/obj/item/weapon/ore/C in contents) + if (istype(C,/obj/item/weapon/ore/diamond)) + amt_diamond++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/glass)) + amt_glass++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/plasma)) + amt_plasma++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/iron)) + amt_iron++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/silver)) + amt_silver++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/gold)) + amt_gold++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/uranium)) + amt_uranium++ + del(C) + continue + else if (istype(C,/obj/item/weapon/ore/clown)) + amt_clown++ + del(C) + continue + return + + /obj/structure/ore_box/attack_hand(obj, mob/user as mob) var/amt_gold = 0 var/amt_silver = 0 @@ -126,12 +170,53 @@ user << browse("[dat]", "window=orebox") return + /obj/structure/ore_box/Topic(href, href_list) if(..()) return usr.machine = src src.add_fingerprint(usr) if(href_list["removeall"]) + if (amt_diamond > 0) + var/obj/item/weapon/ore/diamond/G = new /obj/item/weapon/ore/diamond + G.amount = src.amt_diamond + G.loc = src.loc + src.amt_diamond = 0 + if (amt_glass > 0) + var/obj/item/weapon/ore/glass/G = new /obj/item/weapon/ore/glass + G.amount = src.amt_glass + G.loc = src.loc + src.amt_glass = 0 + if (amt_plasma > 0) + var/obj/item/weapon/ore/plasma/G = new /obj/item/weapon/ore/plasma + G.amount = src.amt_plasma + G.loc = src.loc + src.amt_plasma = 0 + if (amt_iron > 0) + var/obj/item/weapon/ore/iron/G = new /obj/item/weapon/ore/iron + G.amount = src.amt_iron + G.loc = src.loc + src.amt_iron = 0 + if (amt_silver > 0) + var/obj/item/weapon/ore/silver/G = new /obj/item/weapon/ore/silver + G.amount = src.amt_silver + G.loc = src.loc + src.amt_silver = 0 + if (amt_gold > 0) + var/obj/item/weapon/ore/gold/G = new /obj/item/weapon/ore/gold + G.amount = src.amt_gold + G.loc = src.loc + src.amt_gold = 0 + if (amt_uranium > 0) + var/obj/item/weapon/ore/uranium/G = new /obj/item/weapon/ore/uranium + G.amount = src.amt_uranium + G.loc = src.loc + src.amt_uranium = 0 + if (amt_clown > 0) + var/obj/item/weapon/ore/clown/G = new /obj/item/weapon/ore/clown + G.amount = src.amt_clown + G.loc = src.loc + src.amt_clown = 0 for (var/obj/item/weapon/ore/O in contents) contents -= O O.loc = src.loc