From 59a929cd340a431997cf75e0cf25bb6bc824bfc8 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Thu, 26 Nov 2015 12:08:16 -0500 Subject: [PATCH 1/3] Ports over TG Sentience Potion --- .../mob/living/carbon/metroid/metroid.dm | 154 ++++++++++++------ .../chemical_reaction_slime.dm | 2 +- 2 files changed, 109 insertions(+), 47 deletions(-) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 1b82d097cd8..c0e225fbd48 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -722,43 +722,11 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame." icon = 'icons/obj/chemical.dmi' icon_state = "bottle19" + w_class = 1 + origin_tech = "biotech=4" attack(mob/living/carbon/slime/M as mob, mob/user as mob) if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. - user << " The potion only works on baby slimes!" - return ..() - if(M.is_adult) //Can't tame adults - user << " Only baby slimes can be tamed!" - return..() - if(M.stat) - user << " The slime is dead!" - return..() - if(M.mind) - user << " The slime resists!" - return ..() - var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc) - pet.icon_state = "[M.colour] baby slime" - pet.icon_living = "[M.colour] baby slime" - pet.icon_dead = "[M.colour] baby slime dead" - pet.colour = "[M.colour]" - user <<"You feed the slime the potion, removing it's powers and calming it." - qdel(M) - var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) - - if (!newname) - newname = "pet slime" - pet.name = newname - pet.real_name = newname - qdel(src) - -/obj/item/weapon/slimepotion2 - name = "advanced docility potion" - desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle19" - - attack(mob/living/carbon/slime/M as mob, mob/user as mob) - if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime. user << " The potion only works on slimes!" return ..() if(M.stat) @@ -767,20 +735,104 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 if(M.mind) user << " The slime resists!" return ..() - var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc) - pet.icon_state = "[M.colour] adult slime" - pet.icon_living = "[M.colour] adult slime" - pet.icon_dead = "[M.colour] baby slime dead" - pet.colour = "[M.colour]" - user <<"You feed the slime the potion, removing it's powers and calming it." - qdel(M) - var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) + if(M.is_adult) + var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc) + pet.icon_state = "[M.colour] adult slime" + pet.icon_living = "[M.colour] adult slime" + pet.icon_dead = "[M.colour] baby slime dead" + pet.colour = "[M.colour]" + var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) - if (!newname) - newname = "pet slime" - pet.name = newname - pet.real_name = newname + if (!newname) + newname = "pet slime" + pet.name = newname + pet.real_name = newname + qdel(M) + qdel(src) + else + var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc) + pet.icon_state = "[M.colour] baby slime" + pet.icon_living = "[M.colour] baby slime" + pet.icon_dead = "[M.colour] baby slime dead" + pet.colour = "[M.colour]" + var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) + + if (!newname) + newname = "pet slime" + pet.name = newname + pet.real_name = newname + qdel(M) + qdel(src) + user <<"You feed the slime the potion, removing it's powers and calming it." + +/obj/item/weapon/sentience_potion + name = "sentience potion" + desc = "A miraculous chemical mix that can raise the intelligence of creatures to human levels. Unlike normal slime potions, it can be absorbed by any nonsentient being." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle19" + origin_tech = "biotech=5" + var/list/not_interested = list() + var/being_used = 0 + w_class = 1 + + +/obj/item/weapon/sentience_potion/afterattack(mob/living/M, mob/user) + if(being_used || !ismob(M)) + return + if(!isslime(M) && !isanimal(M) || M.ckey) //only works on animals that aren't player controlled + user << "[M] is already too intelligent for this to work!" + return ..() + if(M.stat) + user << "[M] is dead!" + return..() + + user << "You offer the sentience potion to [M]..." + being_used = 1 + + var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET) + + shuffle(candidates) + + var/time_passed = world.time + var/list/consenting_candidates = list() + + for(var/candidate in candidates) + + if(candidate in not_interested) + continue + + spawn(0) + switch(alert(candidate, "Would you like to play as [M.name]? Please choose quickly!","Confirmation","Yes","No")) + if("Yes") + if((world.time-time_passed)>=50 || !src) + return + consenting_candidates += candidate + if("No") + if(!src) + return + not_interested += candidate + + sleep(50) + + if(!src) + return + + listclearnulls(consenting_candidates) //some candidates might have left during sleep(50) + + if(consenting_candidates.len) + var/client/C = null + C = pick(consenting_candidates) + M.key = C.key + M.universal_speak = 1 + M.faction -= "neutral" + M << "All at once it makes sense: you know what you are and who you are! Self awareness is yours!" + M << "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist them in completing their goals at any cost." + user << "[M] accepts the potion and suddenly becomes attentive and aware. It worked!" qdel(src) + else + user << "[M] looks interested for a moment, but then looks back down. Maybe you should try again later." + being_used = 0 + ..() /obj/item/weapon/slimesteroid @@ -788,6 +840,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "A potent chemical mix that will cause a slime to generate more extract." icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" + w_class = 1 + origin_tech = "biotech=4" + attack(mob/living/carbon/slime/M as mob, mob/user as mob) if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. @@ -812,6 +867,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "A potent chemical mix that will give a slime extract three uses." icon = 'icons/obj/chemical.dmi' icon_state = "bottle17" + w_class = 1 + origin_tech = "biotech=4" /obj/item/weapon/slimespeed @@ -819,6 +876,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "A potent chemical mix that will remove the slowdown from any item." icon = 'icons/obj/chemical.dmi' icon_state = "bottle3" + w_class = 1 + origin_tech = "biotech=4" /obj/item/weapon/slimespeed/afterattack(obj/item/C, mob/user) ..() @@ -839,6 +898,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 icon = 'icons/obj/chemical.dmi' icon_state = "bottle17" var/uses = 3 + w_class = 1 + origin_tech = "biotech=4" + /obj/item/weapon/slimefireproof/afterattack(obj/item/clothing/C, mob/user) ..() diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm index 8cfd61cd1dc..b44ffa066c4 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm +++ b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm @@ -433,7 +433,7 @@ required_reagents = list("plasma" = 5) required_other = 1 on_reaction(var/datum/reagents/holder) - var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2 + var/obj/item/weapon/sentience_potion/P = new /obj/item/weapon/sentience_potion P.loc = get_turf(holder.my_atom) //Adamantine slimegolem From 81d3019192360ed53bf3f1163a645660aba70bee Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Thu, 26 Nov 2015 18:28:19 -0500 Subject: [PATCH 2/3] fix --- code/modules/mob/living/carbon/metroid/metroid.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index c0e225fbd48..86d3db3d733 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -741,13 +741,13 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 pet.icon_living = "[M.colour] adult slime" pet.icon_dead = "[M.colour] baby slime dead" pet.colour = "[M.colour]" + qdel(M) var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) if (!newname) newname = "pet slime" pet.name = newname pet.real_name = newname - qdel(M) qdel(src) else var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc) @@ -755,13 +755,13 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 pet.icon_living = "[M.colour] baby slime" pet.icon_dead = "[M.colour] baby slime dead" pet.colour = "[M.colour]" + qdel(M) var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) if (!newname) newname = "pet slime" pet.name = newname pet.real_name = newname - qdel(M) qdel(src) user <<"You feed the slime the potion, removing it's powers and calming it." From 6e52aa2750c628260c2b4faa1db7391bb73fdee3 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Fri, 27 Nov 2015 01:43:11 -0500 Subject: [PATCH 3/3] blocks statues --- code/_globalvars/lists/mobs.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 2b7068e1231..8a3d8f090a9 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -52,7 +52,8 @@ var/global/list/blocked_mobs = list(/mob/living/simple_animal, /mob/living/simple_animal/ascendant_shadowling, /mob/living/simple_animal/slaughter, /mob/living/simple_animal/hostile/retaliate/araneus, - /mob/living/simple_animal/hostile/syndicate/ranged/orion + /mob/living/simple_animal/hostile/syndicate/ranged/orion, + /mob/living/simple_animal/hostile/statue ) var/global/list/med_hud_users = list()