mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
Hydroponics rewrite, details will be in PR. Big commit.
This commit is contained in:
@@ -16,80 +16,78 @@
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
|
||||
icon_state = "posibrain-searching"
|
||||
src.searching = 1
|
||||
src.request_player()
|
||||
spawn(600) reset_search()
|
||||
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
|
||||
icon_state = "posibrain-searching"
|
||||
src.searching = 1
|
||||
src.request_player()
|
||||
spawn(600) reset_search()
|
||||
|
||||
proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
continue
|
||||
if(jobban_isbanned(O, "pAI"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PAI)
|
||||
question(O.client)
|
||||
/obj/item/device/mmi/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
continue
|
||||
if(jobban_isbanned(O, "pAI"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PAI)
|
||||
question(O.client)
|
||||
|
||||
proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PAI
|
||||
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PAI
|
||||
|
||||
|
||||
transfer_identity(var/mob/living/carbon/H)
|
||||
name = "positronic brain ([H])"
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
brainmob.stat = 0
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.assigned_role = "Positronic Brain"
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
|
||||
name = "positronic brain ([H])"
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
brainmob.stat = 0
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.assigned_role = "Positronic Brain"
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
|
||||
icon_state = "posibrain-occupied"
|
||||
return
|
||||
|
||||
proc/transfer_personality(var/mob/candidate)
|
||||
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
|
||||
|
||||
src.searching = 0
|
||||
src.brainmob.mind = candidate.mind
|
||||
//src.brainmob.key = candidate.key
|
||||
src.brainmob.ckey = candidate.ckey
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.searching = 0
|
||||
src.brainmob.mind = candidate.mind
|
||||
src.brainmob.ckey = candidate.ckey
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
|
||||
src.brainmob.mind.assigned_role = "Positronic Brain"
|
||||
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
src.brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
src.brainmob << "<b>Use say :b to speak to other artificial intelligences.</b>"
|
||||
src.brainmob.mind.assigned_role = "Positronic Brain"
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain chimes quietly.")
|
||||
icon_state = "posibrain-occupied"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain chimes quietly.")
|
||||
icon_state = "posibrain-occupied"
|
||||
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
|
||||
proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
if(src.brainmob && src.brainmob.key) return
|
||||
|
||||
if(src.brainmob && src.brainmob.key) return
|
||||
src.searching = 0
|
||||
icon_state = "posibrain"
|
||||
|
||||
src.searching = 0
|
||||
icon_state = "posibrain"
|
||||
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
|
||||
|
||||
/obj/item/device/mmi/posibrain/examine()
|
||||
|
||||
|
||||
@@ -155,10 +155,10 @@
|
||||
turns_per_move = rand(1,3)
|
||||
else if(feral < 0)
|
||||
turns_since_move = 0
|
||||
else if(!my_hydrotray || my_hydrotray.loc != src.loc || !my_hydrotray.planted || my_hydrotray.dead || !my_hydrotray.myseed)
|
||||
else if(!my_hydrotray || my_hydrotray.loc != src.loc || my_hydrotray.dead || !my_hydrotray.seed)
|
||||
var/obj/machinery/hydroponics/my_hydrotray = locate() in src.loc
|
||||
if(my_hydrotray)
|
||||
if(my_hydrotray.planted && !my_hydrotray.dead && my_hydrotray.myseed)
|
||||
if(!my_hydrotray.dead && my_hydrotray.seed)
|
||||
turns_per_move = rand(20,50)
|
||||
else
|
||||
my_hydrotray = null
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
if(udder && prob(5))
|
||||
udder.add_reagent("milk", rand(5, 10))
|
||||
|
||||
if(locate(/obj/effect/spacevine) in loc)
|
||||
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
|
||||
if(locate(/obj/effect/plantsegment) in loc)
|
||||
var/obj/effect/plantsegment/SV = locate(/obj/effect/plantsegment) in loc
|
||||
del(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
@@ -55,7 +55,7 @@
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/effect/spacevine) in step)
|
||||
if(locate(/obj/effect/plantsegment) in step)
|
||||
Move(step)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
@@ -65,8 +65,8 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Move()
|
||||
..()
|
||||
if(!stat)
|
||||
if(locate(/obj/effect/spacevine) in loc)
|
||||
var/obj/effect/spacevine/SV = locate(/obj/effect/spacevine) in loc
|
||||
if(locate(/obj/effect/plantsegment) in loc)
|
||||
var/obj/effect/plantsegment/SV = locate(/obj/effect/plantsegment) in loc
|
||||
del(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
@@ -755,10 +755,15 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove()
|
||||
if(buckled && (!buckled.movable))
|
||||
|
||||
var/is_movable
|
||||
if(buckled && istype(buckled))
|
||||
is_movable = buckled.movable
|
||||
|
||||
if(buckled && !is_movable)
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
if( istype(buckled,/obj/structure/stool/bed/chair) )
|
||||
if(istype(buckled,/obj/structure/stool/bed/chair) )
|
||||
lying = 0
|
||||
else if(istype(buckled, /obj/vehicle))
|
||||
var/obj/vehicle/V = buckled
|
||||
@@ -768,7 +773,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
lying = 1
|
||||
else
|
||||
lying = 1
|
||||
else if(buckled && (buckled.movable))
|
||||
else if(buckled && is_movable)
|
||||
anchored = 0
|
||||
canmove = 1
|
||||
lying = 0
|
||||
@@ -776,7 +781,6 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
lying = 1
|
||||
canmove = 0
|
||||
else if( stunned )
|
||||
// lying = 0
|
||||
canmove = 0
|
||||
else if(captured)
|
||||
anchored = 1
|
||||
|
||||
@@ -842,18 +842,18 @@ datum
|
||||
description = "Sterilizes wounds in preparation for surgery."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
|
||||
|
||||
//makes you squeaky clean
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
if (method == TOUCH)
|
||||
M.germ_level -= min(volume*20, M.germ_level)
|
||||
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
O.germ_level -= min(volume*20, O.germ_level)
|
||||
|
||||
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
T.germ_level -= min(volume*20, T.germ_level)
|
||||
|
||||
|
||||
/* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
src = null
|
||||
if (method==TOUCH)
|
||||
@@ -1332,7 +1332,7 @@ datum
|
||||
if(!M) M = holder.my_atom
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
|
||||
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
|
||||
for(var/datum/organ/internal/I in H.internal_organs)
|
||||
if(I.damage > 0)
|
||||
@@ -1768,7 +1768,7 @@ datum
|
||||
alien_weeds.healthcheck()
|
||||
else if(istype(O,/obj/effect/glowshroom)) //even a small amount is enough to kill it
|
||||
del(O)
|
||||
else if(istype(O,/obj/effect/spacevine))
|
||||
else if(istype(O,/obj/effect/plantsegment))
|
||||
if(prob(50)) del(O) //Kills kudzu too.
|
||||
// Damage that is done to growing plants is separately at code/game/machinery/hydroponics at obj/item/hydroponics
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,3 @@
|
||||
|
||||
/obj/item/seeds/telriis
|
||||
name = "pack of telriis seeds"
|
||||
desc = "These seeds grow into telriis grass. Not recommended for consumption by sentient species."
|
||||
icon_state = "seed-alien1"
|
||||
mypath = "/obj/item/seeds/telriis"
|
||||
species = "telriis"
|
||||
plantname = "Telriis grass"
|
||||
productname = "/obj/item/weapon/telriis_clump"
|
||||
lifespan = 50 //number of ticks
|
||||
endurance = 50 //
|
||||
maturation = 5 //ticks to full growth stage
|
||||
production = 5 //ticks till ready to harvest
|
||||
yield = 4 //number produced when harvest
|
||||
potency = 5
|
||||
plant_type = 1 //1=weed, 2=shroom, 0=normal
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/telriis_clump
|
||||
name = "telriis grass"
|
||||
desc = "A clump of telriis grass, not recommended for consumption by sentients."
|
||||
@@ -27,24 +9,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/thaadra
|
||||
name = "pack of thaa'dra seeds"
|
||||
desc = "These seeds grow into Thaa'dra lichen. Likes the cold."
|
||||
icon_state = "seed-alien3"
|
||||
mypath = "/obj/item/seeds/thaadra"
|
||||
species = "thaadra"
|
||||
plantname = "Thaa'dra lichen"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/thaadra"
|
||||
lifespan = 20
|
||||
endurance = 10
|
||||
maturation = 5
|
||||
production = 9
|
||||
yield = 2
|
||||
potency = 5
|
||||
plant_type = 2
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/thaadrabloom
|
||||
name = "thaa'dra bloom"
|
||||
desc = "Looks chewy, might be good to eat."
|
||||
@@ -56,23 +20,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/jurlmah
|
||||
name = "pack of jurl'mah seeds"
|
||||
desc = "These seeds grow into jurl'mah reeds, which produce large syrupy pods."
|
||||
icon_state = "seed-alien3"
|
||||
mypath = "/obj/item/seeds/jurlmah"
|
||||
species = "jurlmah"
|
||||
plantname = "jurl'mah reeds"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/jurlmah"
|
||||
lifespan = 20
|
||||
endurance = 12
|
||||
maturation = 8
|
||||
production = 9
|
||||
yield = 3
|
||||
potency = 10
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/jurlmah
|
||||
name = "jurl'mah pod"
|
||||
desc = "Bulbous and veiny, it appears to pulse slightly as you look at it."
|
||||
@@ -84,23 +31,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/amauri
|
||||
name = "pack of amauri seeds"
|
||||
desc = "Grows into a straight, dark plant with small round fruit."
|
||||
icon_state = "seed-alien3"
|
||||
mypath = "/obj/item/seeds/amauri"
|
||||
species = "amauri"
|
||||
plantname = "amauri plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/amauri"
|
||||
lifespan = 30
|
||||
endurance = 10
|
||||
maturation = 8
|
||||
production = 9
|
||||
yield = 4
|
||||
potency = 10
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/amauri
|
||||
name = "amauri fruit"
|
||||
desc = "It is small, round and hard. Its skin is a thick dark purple."
|
||||
@@ -113,23 +43,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/gelthi
|
||||
name = "pack of gelthi seeds"
|
||||
desc = "Grows into a bright, wavy plant with many small fruits."
|
||||
icon_state = "seed-alien2"
|
||||
mypath = "/obj/item/seeds/gelthi"
|
||||
species = "gelthi"
|
||||
plantname = "gelthi plant"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/gelthi"
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 2
|
||||
potency = 1
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/gelthi
|
||||
name = "gelthi berries"
|
||||
desc = "They feel fluffy and slightly warm to the touch."
|
||||
@@ -143,23 +56,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/vale
|
||||
name = "pack of vale seeds"
|
||||
desc = "The vale bush is often depicted in ancient heiroglyphs and is similar to cherry blossoms."
|
||||
icon_state = "seed-alien2"
|
||||
mypath = "/obj/item/seeds/vale"
|
||||
species = "vale"
|
||||
plantname = "vale bush"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/vale"
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 8
|
||||
production = 10
|
||||
yield = 3
|
||||
potency = 3
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/vale
|
||||
name = "vale leaves"
|
||||
desc = "Small, curly leaves covered in a soft pale fur."
|
||||
@@ -172,23 +68,6 @@
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/seeds/surik
|
||||
name = "pack of surik seeds"
|
||||
desc = "A spiky blue vine with large fruit resembling pig ears."
|
||||
icon_state = "seed-alien3"
|
||||
mypath = "/obj/item/seeds/surik"
|
||||
species = "surik"
|
||||
plantname = "surik vine"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/surik"
|
||||
lifespan = 30
|
||||
endurance = 18
|
||||
maturation = 7
|
||||
production = 7
|
||||
yield = 3
|
||||
potency = 3
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/surik
|
||||
name = "surik fruit"
|
||||
desc = "Multiple layers of blue skin peeling away to reveal a spongey core, vaguely resembling an ear."
|
||||
@@ -199,4 +78,4 @@
|
||||
reagents.add_reagent("impedrezene", potency * 3)
|
||||
reagents.add_reagent("synaptizine", potency * 2)
|
||||
reagents.add_reagent("nutriment", potency)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
Reference in New Issue
Block a user