From 68eda1787b8dad40b7548c480a4a2bc83368078f Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Sat, 23 May 2015 19:56:03 +1000 Subject: [PATCH 1/4] fixes cells corrupt()ing maxcharge, mime spells as borg and condi botles not allowing naming --- code/datums/spells/mime.dm | 1 + code/modules/power/cell.dm | 5 +++-- code/modules/reagents/Chemistry-Machinery.dm | 17 ++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm index b0a7e3a336f..6ad4f4243a3 100644 --- a/code/datums/spells/mime.dm +++ b/code/datums/spells/mime.dm @@ -11,6 +11,7 @@ clothes_req = 0 range = 0 cast_sound = null + human_req = 1 action_icon_state = "mime" action_background_icon_state = "bg_mime" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 359fade7a30..125d19729e9 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -50,7 +50,8 @@ if(rigged && amount > 0) explode() return 0 - if(maxcharge < amount) return 0 + if(maxcharge < amount) + amount = maxcharge var/power_used = min(maxcharge-charge,amount) if(crit_fail) return 0 if(!prob(reliability)) @@ -106,7 +107,7 @@ /obj/item/weapon/stock_parts/cell/proc/corrupt() charge /= 2 - maxcharge /= 2 + maxcharge = max(maxcharge/2, chargerate) if (prob(10)) rigged = 1 //broken batterys are dangerous diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index e41fd5639eb..610872ab7bc 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -327,18 +327,17 @@ mode = !mode else if(href_list["createbottle"]) - if(!condi) - var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN) - if(!name) - return + var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN) + if(!name) + return + if(condi) + var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) + else var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) - P.name = trim("[name] bottle") P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) - reagents.trans_to(P, 30) - else - var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) - reagents.trans_to(P, 50) + P.name = trim("[name] bottle") + reagents.trans_to(P, P.volume) if(beaker) From fd10bfb9abd58c08538cce823771ab83d75a4604 Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Sun, 24 May 2015 00:05:52 +1000 Subject: [PATCH 2/4] afk check for mutiny and lockers dont count as fleeing in rev/gang --- code/game/gamemodes/gang/gang.dm | 2 +- code/game/gamemodes/objective.dm | 2 +- code/game/gamemodes/revolution/revolution.dm | 6 +++--- code/modules/reagents/Chemistry-Machinery.dm | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 192c3d59345..6967dc894c7 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -320,7 +320,7 @@ if(gang_mind.current) if(gang_mind.current.stat == DEAD || isbrain(gang_mind.current)) text += "died" - else if(gang_mind.current.z != ZLEVEL_STATION) + else if(gang_mind.current.z > ZLEVEL_STATION) text += "fled the station" else text += "survived" diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 9f0eee8e881..5da73b4e255 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -85,7 +85,7 @@ datum/objective/mutiny/check_completion() if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z != ZLEVEL_STATION)) //If they leave the station they count as dead for this + if(T && (T.z > ZLEVEL_STATION) || target.current.client.is_afk()) //If they leave the station or go afk they count as dead for this return 2 return 0 return 1 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index c86abe88512..88e6ce8b2c6 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -345,7 +345,7 @@ if(headrev.current) if(headrev.current.stat == DEAD) text += "died" - else if(headrev.current.z != ZLEVEL_STATION) + else if(headrev.current.z > ZLEVEL_STATION) text += "fled the station" else text += "survived the revolution" @@ -369,7 +369,7 @@ if(rev.current) if(rev.current.stat == DEAD || isbrain(rev.current)) text += "died" - else if(rev.current.z != ZLEVEL_STATION) + else if(rev.current.z > ZLEVEL_STATION) text += "fled the station" else text += "survived the revolution" @@ -395,7 +395,7 @@ if(head.current) if(head.current.stat == DEAD || isbrain(head.current)) text += "died" - else if(head.current.z != ZLEVEL_STATION) + else if(head.current.z > ZLEVEL_STATION) text += "fled the station" else text += "survived the revolution" diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 610872ab7bc..7a7aadcbaf4 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -330,10 +330,11 @@ var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN) if(!name) return + var/obj/item/weapon/reagent_containers/P if(condi) - var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) + P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) else - var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) + P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) P.name = trim("[name] bottle") From 8c10127e1f7729aea6d4542155a505b455737817 Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Sun, 24 May 2015 22:52:28 +1000 Subject: [PATCH 3/4] fixes noshield flag and movable occupied processors --- code/modules/food&drinks/kitchen machinery/gibber.dm | 3 --- code/modules/food&drinks/kitchen machinery/processor.dm | 3 --- code/modules/mob/living/carbon/human/human_defense.dm | 9 ++++++--- code/modules/mob/living/carbon/human/species.dm | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/code/modules/food&drinks/kitchen machinery/gibber.dm b/code/modules/food&drinks/kitchen machinery/gibber.dm index 064e0aeb379..38a52ffa9ff 100644 --- a/code/modules/food&drinks/kitchen machinery/gibber.dm +++ b/code/modules/food&drinks/kitchen machinery/gibber.dm @@ -78,9 +78,6 @@ src.startgibbing(user) /obj/machinery/gibber/attackby(obj/item/weapon/grab/G as obj, mob/user as mob, params) - if(src.occupant) - user << "The gibber is full, empty it first!" - return if(default_unfasten_wrench(user, G)) return diff --git a/code/modules/food&drinks/kitchen machinery/processor.dm b/code/modules/food&drinks/kitchen machinery/processor.dm index cd87e36e038..cde0bf70683 100644 --- a/code/modules/food&drinks/kitchen machinery/processor.dm +++ b/code/modules/food&drinks/kitchen machinery/processor.dm @@ -123,9 +123,6 @@ if(src.processing) user << "The processor is in the process of processing!" return 1 - if(src.contents.len > 0) //TODO: several items at once? several different items? - user << "Something is already in the processing chamber!" - return 1 if(default_unfasten_wrench(user, O)) return var/what = O diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 980ba2ce475..ab85a8f3d19 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -62,7 +62,7 @@ emp_act return -1 // complete projectile permutation - if(check_shields(P.damage, "the [P.name]")) + if(check_shields(P.damage, "the [P.name]", P)) P.on_hit(src, 100, def_zone) return 2 return (..(P , def_zone)) @@ -85,7 +85,10 @@ emp_act //End Here -/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack") +/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack", var/obj/item/O) + if(O) + if(O.flags & NOSHIELD) //weapon ignores shields altogether + return 0 if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3) var/obj/item/weapon/I = l_hand if(I.IsShield() && (prob(50 - round(damage / 3)))) @@ -134,7 +137,7 @@ emp_act else if(user != src) user.do_attack_animation(src) - if(check_shields(I.force, "the [I.name]")) + if(check_shields(I.force, "the [I.name]", I)) return 0 if(I.attack_verb && I.attack_verb.len) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index b76b9da8f12..aa3f793b677 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -855,7 +855,7 @@ // Allows you to put in item-specific reactions based on species if(user != src) user.do_attack_animation(H) - if((user != H) && H.check_shields(I.force, "the [I.name]")) + if((user != H) && H.check_shields(I.force, "the [I.name]", I)) return 0 if(I.attack_verb && I.attack_verb.len) From 2b5d26663f6250f2717989f084a0330edcbf40ea Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Sun, 24 May 2015 23:22:42 +1000 Subject: [PATCH 4/4] fixes quick equip to backpacks making no sound --- code/modules/mob/living/carbon/human/inventory.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index c7db2dc90c6..1a4cd41351c 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -182,6 +182,7 @@ S = H.get_item_by_slot(slot_back) //else we put in backpack if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) S.handle_item_insertion(I) + playsound(src.loc, "rustle", 50, 1, -5) else H << "You are unable to equip that!"