From 81ed1467d7b0f2600eb61e15213d2beaffdb563a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 13 Apr 2016 01:50:11 -0400 Subject: [PATCH 1/2] Xenobio Additions --- .../game/objects/items/weapons/power_cells.dm | 25 ++++++++--- code/modules/power/cell.dm | 5 +++ .../chemical_reaction_slime.dm | 14 ++++++ .../research/xenobiology/xenobiology.dm | 43 +++++++++++++++++++ 4 files changed, 82 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index d2598a4036f..62f60a91bc4 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -16,10 +16,18 @@ materials = list(MAT_METAL=700, MAT_GLASS=50) var/rigged = 0 // true if rigged to explode var/minor_fault = 0 //If not 100% reliable, it will build up faults. + var/chargerate = 1000 //how much power is given every tick in a recharger + var/self_recharge = 0 //does it self recharge, over time, or not? - suicide_act(mob/user) - to_chat(viewers(user), "[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.") - return (FIRELOSS) +/obj/item/weapon/stock_parts/cell/suicide_act(mob/user) + to_chat(viewers(user), "[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.") + return (FIRELOSS) + +/obj/item/weapon/stock_parts/cell/process() + if(self_recharge) + give(chargerate * 0.25) + else + return PROCESS_KILL /obj/item/weapon/stock_parts/cell/crap name = "\improper Nanotrasen brand rechargable AA battery" @@ -51,6 +59,7 @@ maxcharge = 15000 rating = 3 materials = list(MAT_GLASS=60) + chargerate = 1500 /obj/item/weapon/stock_parts/cell/high/empty/New() ..() @@ -63,6 +72,7 @@ maxcharge = 20000 materials = list(MAT_GLASS=70) rating = 4 + chargerate = 2000 /obj/item/weapon/stock_parts/cell/super/empty/New() ..() @@ -75,6 +85,7 @@ maxcharge = 30000 rating = 5 materials = list(MAT_GLASS=80) + chargerate = 3000 /obj/item/weapon/stock_parts/cell/hyper/empty/New() ..() @@ -87,6 +98,7 @@ maxcharge = 40000 materials = list(MAT_GLASS=80) rating = 6 + chargerate = 4000 /obj/item/weapon/stock_parts/cell/bluespace/empty/New() ..() @@ -99,8 +111,10 @@ maxcharge = 30000 rating = 6 materials = list(MAT_GLASS=80) - use() - return 1 + chargerate = 30000 + +/obj/item/weapon/stock_parts/cell/infinite/use() + return 1 /obj/item/weapon/stock_parts/cell/potato name = "potato battery" @@ -122,6 +136,7 @@ icon = 'icons/mob/slimes.dmi' icon_state = "yellow slime extract" materials = list() + self_recharge = 1 // Infused slime cores self-recharge, over time /obj/item/weapon/stock_parts/cell/pulse/carbine name = "pulse carbine power cell" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 7dda66629d7..6e61be2a257 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -5,11 +5,16 @@ /obj/item/weapon/stock_parts/cell/New() ..() + processing_objects.Add(src) charge = maxcharge spawn(5) updateicon() +/obj/item/weapon/stock_parts/cell/Destroy() + processing_objects.Remove(src) + return ..() + /obj/item/weapon/stock_parts/cell/proc/updateicon() if(isnull(src.overlay_image)) src.overlay_image = image('icons/obj/power.dmi') 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 ee51efe2b1e..c80370734d4 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm +++ b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm @@ -662,3 +662,17 @@ S.colour = pick("grey","orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black") S.forceMove(get_turf(holder.my_atom)) S.visible_message("Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!") + +/datum/chemical_reaction/slime_transfer + name = "Transfer Potion" + id = "slimetransfer" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required_other = 1 + required_container = /obj/item/slime_extract/rainbow + +/datum/chemical_reaction/slime_transfer/on_reaction(datum/reagents/holder) + feedback_add_details("slime_cores_used","[type]") + var/obj/item/slimepotion/transference/P = new /obj/item/slimepotion/transference + P.forceMove(get_turf(holder.my_atom)) \ No newline at end of file diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 44384db8187..7d2462494e9 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -223,6 +223,49 @@ being_used = 0 ..() +/obj/item/slimepotion/transference + name = "consciousness transference potion" + desc = "A strange slime-based chemical that, when used, allows the user to transfer their consciousness to a lesser being." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle6" + origin_tech = "biotech=6" + var/prompted = 0 + var/animal_type = SENTIENCE_ORGANIC + +/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user) + if(prompted || !ismob(M)) + return + if(!isanimal(M) || M.ckey) //much like sentience, these will not work on something that is already player controlled + user << "[M] already has a higher consciousness!" + return ..() + if(M.stat) + user << "[M] is dead!" + return ..() + var/mob/living/simple_animal/SM = M + if(SM.sentience_type != animal_type) + user << "You cannot transfer your consciousness to [SM]." //no controlling machines + return ..() + if(jobban_isbanned(user, ROLE_SENTIENT)) + user << "Your mind goes blank as you attempt to use the potion." + return + + prompted = 1 + if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No") + prompted = 0 + return + + user << "You drink the potion then place your hands on [SM]..." + + + user.mind.transfer_to(SM) + SM.universal_speak = 1 + SM.faction = user.faction + SM.sentience_act() //Same deal here as with sentience + user.death() + SM << "In a quick flash, you feel your consciousness flow into [SM]!" + SM << "You are now [SM]. Your allegiances, alliances, and roles are still the same as they were prior to consciousness transfer!" + SM.name = "[SM.name] as [user.real_name]" + qdel(src) /obj/item/slimepotion/steroid name = "slime steroid" From d5fb23d4d75777238c8f361339b56301855d5330 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Tue, 26 Apr 2016 20:12:31 -0400 Subject: [PATCH 2/2] no fun crew has arrived --- .../chemical_reaction_slime.dm | 16 +------ .../research/xenobiology/xenobiology.dm | 44 ------------------- 2 files changed, 1 insertion(+), 59 deletions(-) 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 c80370734d4..45480d91b50 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm +++ b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm @@ -661,18 +661,4 @@ var/mob/living/carbon/slime/S = new /mob/living/carbon/slime S.colour = pick("grey","orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black") S.forceMove(get_turf(holder.my_atom)) - S.visible_message("Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!") - -/datum/chemical_reaction/slime_transfer - name = "Transfer Potion" - id = "slimetransfer" - result = null - required_reagents = list("blood" = 1) - result_amount = 1 - required_other = 1 - required_container = /obj/item/slime_extract/rainbow - -/datum/chemical_reaction/slime_transfer/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[type]") - var/obj/item/slimepotion/transference/P = new /obj/item/slimepotion/transference - P.forceMove(get_turf(holder.my_atom)) \ No newline at end of file + S.visible_message("Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!") \ No newline at end of file diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 7d2462494e9..3c11bdba38a 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -223,50 +223,6 @@ being_used = 0 ..() -/obj/item/slimepotion/transference - name = "consciousness transference potion" - desc = "A strange slime-based chemical that, when used, allows the user to transfer their consciousness to a lesser being." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle6" - origin_tech = "biotech=6" - var/prompted = 0 - var/animal_type = SENTIENCE_ORGANIC - -/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user) - if(prompted || !ismob(M)) - return - if(!isanimal(M) || M.ckey) //much like sentience, these will not work on something that is already player controlled - user << "[M] already has a higher consciousness!" - return ..() - if(M.stat) - user << "[M] is dead!" - return ..() - var/mob/living/simple_animal/SM = M - if(SM.sentience_type != animal_type) - user << "You cannot transfer your consciousness to [SM]." //no controlling machines - return ..() - if(jobban_isbanned(user, ROLE_SENTIENT)) - user << "Your mind goes blank as you attempt to use the potion." - return - - prompted = 1 - if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No") - prompted = 0 - return - - user << "You drink the potion then place your hands on [SM]..." - - - user.mind.transfer_to(SM) - SM.universal_speak = 1 - SM.faction = user.faction - SM.sentience_act() //Same deal here as with sentience - user.death() - SM << "In a quick flash, you feel your consciousness flow into [SM]!" - SM << "You are now [SM]. Your allegiances, alliances, and roles are still the same as they were prior to consciousness transfer!" - SM.name = "[SM.name] as [user.real_name]" - qdel(src) - /obj/item/slimepotion/steroid name = "slime steroid" desc = "A potent chemical mix that will cause a baby slime to generate more extract."