From 59edd0f0d8b4570387835c477bb2a18af6efaab5 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 14 Nov 2015 10:55:56 -0500 Subject: [PATCH 1/5] Fixes bug allowing player to multiclick WG --- code/game/machinery/wishgranter.dm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index b2d131cc274..8f662dab107 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -9,6 +9,7 @@ density = 1 var/datum/mind/target var/list/types = list() + var/inuse = 0 /obj/machinery/wish_granter/New() for(var/supname in all_superheroes) @@ -24,22 +25,30 @@ else if(is_special_character(user)) user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away." + return + + else if(inuse) + user << "Someone is already communing with the Wish Granter." + return else user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?" - + inuse = 1 var/wish if(types.len == 1) wish = pick(types) else wish = input("You want to become...","Wish") as null|anything in types - if(!wish) return + if(!wish) + inuse=0 + return types -= wish var/mob/living/carbon/human/M = user var/datum/superheroes/S = all_superheroes[wish] if(S) S.create(M) + inuse=0 //Remove the wishgranter or teleport it randomly on the station if(!types.len) From fa3412d2c1715b929d1ece9df2947fb6089ddf88 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 14 Nov 2015 17:19:00 -0500 Subject: [PATCH 2/5] Fixes and Balances Meteor Gamemode --- code/game/gamemodes/meteor/meteor.dm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index c5af55acef9..dd93230e73d 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -31,14 +31,13 @@ /datum/game_mode/meteor/proc/sendmeteors() nometeors = 1 - spawn() - var/waveduration = world.time + rand(3000,9000) - var/waitduration = rand(3000,9000) - while(waveduration - world.time > 0) - sleep(20) - spawn() spawn_meteors(6, meteors_normal) - sleep(waitduration) - nometeors = 0 + var/waveduration = world.time + rand(1500,3000) + var/waitduration = rand(3000,9000) + while(waveduration - world.time > 0) + sleep(20) + spawn() spawn_meteors(6, meteors_normal) + sleep(waitduration) + nometeors = 0 /datum/game_mode/meteor/declare_completion() var/text From 0beb8e0156aa685f138e34c933cba20d5d930e6c Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 14 Nov 2015 17:33:24 -0500 Subject: [PATCH 3/5] Sends proper initial warning to crew to give them time to prepare --- code/game/gamemodes/meteor/meteor.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index dd93230e73d..1574234911f 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -3,7 +3,7 @@ config_tag = "meteor" var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) - var/const/initialmeteordelay = 3000 + var/const/initialmeteordelay = 6000 var/nometeors = 1 required_players = 0 @@ -18,7 +18,7 @@ /datum/game_mode/meteor/post_setup() spawn (rand(waittime_l, waittime_h)) - send_intercept() + command_announcement.Announce("The station is on the path of an incoming wave of meteors. Reinforce the hull and prepare damage control parties.", "Incoming Meteors", 'sound/effects/siren.ogg') spawn(initialmeteordelay) nometeors = 0 ..() From 0817c907d91f5846e328422dd2cbcbe45692a941 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 15 Nov 2015 12:10:42 -0500 Subject: [PATCH 4/5] Fixed up if/elseif chains --- code/game/machinery/wishgranter.dm | 55 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 8f662dab107..dba30d648b0 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -23,41 +23,40 @@ user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's." return - else if(is_special_character(user)) + if(is_special_character(user)) user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away." return - else if(inuse) + if(inuse) user << "Someone is already communing with the Wish Granter." return + user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?" + + inuse = 1 + var/wish + if(types.len == 1) + wish = pick(types) else - user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?" - - inuse = 1 - var/wish - if(types.len == 1) - wish = pick(types) - else - wish = input("You want to become...","Wish") as null|anything in types - if(!wish) - inuse=0 - return - types -= wish - var/mob/living/carbon/human/M = user - var/datum/superheroes/S = all_superheroes[wish] - if(S) - S.create(M) + wish = input("You want to become...","Wish") as null|anything in types + if(!wish) inuse=0 + return + types -= wish + var/mob/living/carbon/human/M = user + var/datum/superheroes/S = all_superheroes[wish] + if(S) + S.create(M) + inuse=0 - //Remove the wishgranter or teleport it randomly on the station - if(!types.len) - user << "The wishgranter slowly fades into mist..." - qdel(src) - return - else - var/impact_area = findEventArea() - var/turf/T = pick(get_area_turfs(impact_area)) - if(T) - src.loc = T + //Remove the wishgranter or teleport it randomly on the station + if(!types.len) + user << "The wishgranter slowly fades into mist..." + qdel(src) + return + else + var/impact_area = findEventArea() + var/turf/T = pick(get_area_turfs(impact_area)) + if(T) + src.loc = T return \ No newline at end of file From 6927c6164a26a7d1e4421ae8741b699b2773b1e8 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Sun, 15 Nov 2015 15:38:45 -0800 Subject: [PATCH 5/5] IPCs now heal in an upgraded cyborg recharger Upgrading the recharger cell will also increase how fast IPCs recharge --- code/game/machinery/rechargestation.dm | 9 +++++---- code/modules/mob/living/carbon/human/human_damage.dm | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 2d568cf1f30..93b01f3951f 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -8,7 +8,7 @@ idle_power_usage = 5 active_power_usage = 1000 var/mob/occupant = null - var/circuitboard = "/obj/item/weapon/circuitboard/cyborgrecharger" + var/circuitboard = /obj/item/weapon/circuitboard/cyborgrecharger var/recharge_speed var/recharge_speed_nutrition var/repairs @@ -44,7 +44,9 @@ for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) repairs += M.rating - 1 for(var/obj/item/weapon/stock_parts/cell/C in component_parts) - recharge_speed *= C.maxcharge / 10000 + var/multiplier = C.maxcharge / 10000 + recharge_speed *= multiplier + recharge_speed_nutrition *= multiplier /obj/machinery/recharge_station/process() if(!(NOPOWER|BROKEN)) @@ -116,8 +118,7 @@ if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450) H.nutrition = min(H.nutrition+recharge_speed_nutrition, 450) if(repairs) - H.adjustBruteLoss(-(repairs)) - H.adjustFireLoss(-(repairs)) + H.heal_overall_damage(repairs, repairs, 0, 1) H.updatehealth() /obj/machinery/recharge_station/proc/go_out() diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index d09c61ce3b8..faaba025181 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -252,7 +252,7 @@ //Heal MANY external organs, in random order -/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn) +/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn, var/internal=0, var/robotic=0) var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn) var/update = 0 @@ -262,7 +262,7 @@ var/brute_was = picked.brute_dam var/burn_was = picked.burn_dam - update |= picked.heal_damage(brute,burn) + update |= picked.heal_damage(brute,burn, internal, robotic) brute -= (brute_was-picked.brute_dam) burn -= (burn_was-picked.burn_dam)