mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
fixes
This commit is contained in:
@@ -407,13 +407,16 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
SetTurfs()
|
||||
|
||||
//==========DAT FUKKEN DISK===============
|
||||
/obj/item/weapon/disk
|
||||
icon = 'icons/obj/module.dmi'
|
||||
w_class = 1
|
||||
item_state = "card-id"
|
||||
icon_state = "datadisk0"
|
||||
|
||||
/obj/item/weapon/disk/nuclear
|
||||
name = "nuclear authentication disk"
|
||||
desc = "Better keep this safe."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "nucleardisk"
|
||||
item_state = "card-id"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/disk/nuclear/New()
|
||||
..()
|
||||
|
||||
@@ -51,13 +51,25 @@
|
||||
//TO-DO: Make the genetics machine accept them.
|
||||
/obj/item/weapon/disk/data
|
||||
name = "cloning data disk"
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
|
||||
item_state = "card-id"
|
||||
w_class = 1
|
||||
var/list/fields = list()
|
||||
var/read_only = 0 //Well,it's still a floppy disk
|
||||
|
||||
//Disk stuff.
|
||||
/obj/item/weapon/disk/data/New()
|
||||
..()
|
||||
icon_state = "datadisk[rand(0,6)]"
|
||||
overlays += "datadisk_gene"
|
||||
|
||||
|
||||
/obj/item/weapon/disk/data/attack_self(mob/user)
|
||||
read_only = !read_only
|
||||
user << "<span class='notice'>You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"].</span>"
|
||||
|
||||
/obj/item/weapon/disk/data/examine(mob/user)
|
||||
..()
|
||||
user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]."
|
||||
|
||||
|
||||
//Find a dead mob with a brain and client.
|
||||
/proc/find_dead_player(find_key)
|
||||
@@ -78,19 +90,6 @@
|
||||
break
|
||||
return selected
|
||||
|
||||
//Disk stuff.
|
||||
/obj/item/weapon/disk/data/New()
|
||||
..()
|
||||
icon_state = "datadisk[pick(0,1,2)]"
|
||||
|
||||
/obj/item/weapon/disk/data/attack_self(mob/user)
|
||||
read_only = !read_only
|
||||
user << "<span class='notice'>You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"].</span>"
|
||||
|
||||
/obj/item/weapon/disk/data/examine(mob/user)
|
||||
..()
|
||||
user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]."
|
||||
|
||||
//Health Tracker Implant
|
||||
|
||||
/obj/item/weapon/implant/health
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/obj/item/device/malf_upgrade
|
||||
name = "combat software upgrade"
|
||||
desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk0"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "datadisk3"
|
||||
|
||||
|
||||
/obj/item/device/malf_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
|
||||
@@ -26,8 +26,8 @@
|
||||
/obj/item/device/surveillance_upgrade
|
||||
name = "surveillance software upgrade"
|
||||
desc = "A software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk0"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "datadisk3"
|
||||
|
||||
/obj/item/device/surveillance_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
|
||||
if(!istype(AI))
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
|
||||
seed = new seed()
|
||||
seed.potency = 50
|
||||
seed.prepare_result(src)
|
||||
else // Something is terribly wrong
|
||||
qdel(src)
|
||||
return
|
||||
@@ -35,16 +34,13 @@
|
||||
if(dried_type == -1)
|
||||
dried_type = src.type
|
||||
|
||||
add_juice()
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, newloc)
|
||||
|
||||
seed.prepare_result(src)
|
||||
add_juice()
|
||||
transform *= TransformUsingVariable(seed.potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!
|
||||
|
||||
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
|
||||
if(G)
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)//adjusts the lighting on the mob
|
||||
else
|
||||
src.SetLuminosity(G.get_lum(seed))
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/add_juice()
|
||||
@@ -117,7 +113,7 @@
|
||||
for(var/datum/plant_gene/trait/trait in seed.genes)
|
||||
trait.on_squash(src, target)
|
||||
|
||||
for(var/atom/A in T)
|
||||
for(var/A in T)
|
||||
reagents.reaction(A)
|
||||
|
||||
qdel(src)
|
||||
@@ -128,9 +124,9 @@
|
||||
T.on_consume(src, usr)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(AM as mob|obj)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/Crossed(atom/movable/AM)
|
||||
var/datum/plant_gene/trait/slip/S = seed.get_gene(/datum/plant_gene/trait/slip)
|
||||
if(S && !ispath(trash, /obj/item/weapon/grown) && istype(AM, /mob/living/carbon))
|
||||
if(S && !ispath(trash, /obj/item/weapon/grown) && iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
var/stun = min(seed.potency * S.rate * 2, 1)
|
||||
var/weaken = min(seed.potency * S.rate, 0.5)
|
||||
@@ -144,7 +140,7 @@
|
||||
// Glow gene procs
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/Destroy()
|
||||
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
|
||||
if(G && istype(loc,/mob))
|
||||
if(G && ismob(loc))
|
||||
loc.AddLuminosity(-G.get_lum(seed))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -100,14 +100,12 @@
|
||||
icon_state = "banana_blue"
|
||||
trash = /obj/item/weapon/grown/bananapeel/bluespace
|
||||
filling_color = "#0000FF"
|
||||
origin_tech = "bluespace=3"
|
||||
|
||||
/obj/item/weapon/grown/bananapeel/bluespace
|
||||
seed = /obj/item/seeds/banana/bluespace
|
||||
name = "bluespace banana peel"
|
||||
desc = "A peel from a bluespace banana."
|
||||
icon_state = "banana_peel_blue"
|
||||
origin_tech = "bluespace=3"
|
||||
|
||||
|
||||
// Other
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
name = "blue-space tomato"
|
||||
desc = "So lubricated, you might slip through space-time."
|
||||
icon_state = "bluespacetomato"
|
||||
origin_tech = "bluespace=3"
|
||||
|
||||
|
||||
// Killer Tomato
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
|
||||
seed = new seed()
|
||||
seed.potency = 50
|
||||
seed.prepare_result(src)
|
||||
else // Something is terribly wrong
|
||||
qdel(src)
|
||||
return
|
||||
@@ -26,16 +25,14 @@
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
add_juice()
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, newloc)
|
||||
|
||||
if(istype(src, seed.product)) // no adding reagents if it is just a trash item
|
||||
seed.prepare_result(src)
|
||||
add_juice()
|
||||
transform *= TransformUsingVariable(seed.potency, 100, 0.5)
|
||||
|
||||
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
|
||||
if(G)
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)//adjusts the lighting on the mob
|
||||
else
|
||||
src.SetLuminosity(G.get_lum(seed))
|
||||
|
||||
/obj/item/weapon/grown/attackby(obj/item/O, mob/user, params)
|
||||
..()
|
||||
@@ -52,9 +49,9 @@
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/grown/Crossed(AM as mob|obj)
|
||||
/obj/item/weapon/grown/Crossed(atom/movable/AM)
|
||||
var/datum/plant_gene/trait/slip/S = seed.get_gene(/datum/plant_gene/trait/slip)
|
||||
if(S && istype(AM, /mob/living/carbon))
|
||||
if(S && iscarbon(AM))
|
||||
var/mob/living/carbon/M = AM
|
||||
var/stun = min(seed.potency * S.rate * 2, 1)
|
||||
var/weaken = min(seed.potency * S.rate, 0.5)
|
||||
@@ -68,7 +65,7 @@
|
||||
// Glow gene procs
|
||||
/obj/item/weapon/grown/Destroy()
|
||||
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
|
||||
if(G && istype(loc,/mob))
|
||||
if(G && ismob(loc))
|
||||
loc.AddLuminosity(-G.get_lum(seed))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -85,22 +85,36 @@
|
||||
/datum/plant_gene/trait
|
||||
var/rate = 0.05
|
||||
var/examine_line = ""
|
||||
var/list/origin_tech = null
|
||||
|
||||
/datum/plant_gene/trait/Copy()
|
||||
var/datum/plant_gene/trait/G = ..()
|
||||
G.rate = rate
|
||||
return G
|
||||
|
||||
/datum/plant_gene/trait/proc/on_new(obj/item/weapon/reagent_containers/food/snacks/grown/G, newloc)
|
||||
if(origin_tech) // This ugly code segment adds RnD tech levels to resulting plants.
|
||||
if(G.origin_tech)
|
||||
var/list/tech = params2list(G.origin_tech)
|
||||
for(var/t in origin_tech)
|
||||
if(t in tech)
|
||||
tech[t] = max(tech[t], origin_tech[t])
|
||||
else
|
||||
tech[t] = origin_tech[t]
|
||||
G.origin_tech = list2params(tech)
|
||||
else
|
||||
G.origin_tech = list2params(origin_tech)
|
||||
return
|
||||
|
||||
/datum/plant_gene/trait/proc/on_consume(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
|
||||
return
|
||||
|
||||
/datum/plant_gene/trait/proc/on_slip(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
|
||||
return
|
||||
|
||||
/datum/plant_gene/trait/proc/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/datum/plant_gene/trait/squash
|
||||
// Allows the plant to be squashed when thrown or slipped on, leaving a colored mess and trash type item behind.
|
||||
// Also splashes everything in target turf with reagents and applies other trait effects (teleporting, etc) to the target by on_squash.
|
||||
@@ -128,6 +142,7 @@
|
||||
// Multiplies max charge by (rate*1000) when used in potato power cells.
|
||||
name = "Electrical Activity"
|
||||
rate = 0.01
|
||||
origin_tech = list("powerstorage" = 4)
|
||||
|
||||
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
|
||||
var/power = G.seed.potency*rate*5
|
||||
@@ -168,6 +183,13 @@
|
||||
/datum/plant_gene/trait/glow/proc/get_lum(obj/item/seeds/S)
|
||||
return round(S.potency*rate)
|
||||
|
||||
/datum/plant_gene/trait/glow/on_new(obj/item/weapon/reagent_containers/food/snacks/grown/G, newloc)
|
||||
..()
|
||||
if(ismob(newloc))
|
||||
G.pickup(newloc)//adjusts the lighting on the mob
|
||||
else
|
||||
G.SetLuminosity(get_lum(G.seed))
|
||||
|
||||
/datum/plant_gene/trait/glow/berry
|
||||
name = "Strong Bioluminescence"
|
||||
rate = 0.2
|
||||
@@ -178,6 +200,7 @@
|
||||
// Teleport radius is calculated as max(round(potency*rate), 1)
|
||||
name = "Bluespace Activity"
|
||||
rate = 0.1
|
||||
origin_tech = list("bluespace" = 3)
|
||||
|
||||
/datum/plant_gene/trait/teleport/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
|
||||
if(isliving(target))
|
||||
@@ -195,4 +218,17 @@
|
||||
do_teleport(G, T, teleport_radius)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/molten_item(T) //Leave a pile of goo behind for dramatic effect...
|
||||
qdel(G)
|
||||
qdel(G)
|
||||
|
||||
|
||||
/datum/plant_gene/trait/noreact
|
||||
// Makes plant NOREACT until squashed.
|
||||
name = "Separated Chemicals"
|
||||
|
||||
/datum/plant_gene/trait/noreact/on_new(obj/item/weapon/reagent_containers/food/snacks/grown/G, newloc)
|
||||
..()
|
||||
G.flags |= NOREACT
|
||||
|
||||
/datum/plant_gene/trait/noreact/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
|
||||
G.flags &= ~NOREACT
|
||||
G.reagents.handle_reactions()
|
||||
@@ -51,9 +51,9 @@
|
||||
if(!nogenes) // not used on Copy()
|
||||
genes += new /datum/plant_gene/core/lifespan(lifespan)
|
||||
genes += new /datum/plant_gene/core/endurance(endurance)
|
||||
genes += new /datum/plant_gene/core/production(production)
|
||||
if(yield != -1)
|
||||
genes += new /datum/plant_gene/core/yield(yield)
|
||||
genes += new /datum/plant_gene/core/production(production)
|
||||
if(potency != -1)
|
||||
genes += new /datum/plant_gene/core/potency(potency)
|
||||
|
||||
@@ -83,6 +83,12 @@
|
||||
/obj/item/seeds/proc/get_gene(typepath)
|
||||
return (locate(typepath) in genes)
|
||||
|
||||
/obj/item/seeds/proc/reagents_from_genes()
|
||||
reagents_add = list()
|
||||
for(var/datum/plant_gene/reagent/R in genes)
|
||||
reagents_add[R.reagent_id] = R.rate
|
||||
|
||||
|
||||
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj, /obj/item/projectile/energy/florayield))
|
||||
|
||||
@@ -120,7 +126,6 @@
|
||||
var/product_name
|
||||
while(t_amount < getYield())
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
|
||||
prepare_result(t_prod)
|
||||
result.Add(t_prod) // User gets a consumable
|
||||
if(!t_prod)
|
||||
return
|
||||
@@ -164,9 +169,10 @@
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/adjust_production(adjustamt)
|
||||
production = Clamp(production + adjustamt, 2, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
C.value = production
|
||||
if(yield != -1)
|
||||
production = Clamp(production + adjustamt, 2, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/adjust_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
@@ -191,7 +197,8 @@
|
||||
if(yield != -1)
|
||||
text += "- Yield: [yield]\n"
|
||||
text += "- Maturation speed: [maturation]\n"
|
||||
text += "- Production speed: [production]\n"
|
||||
if(yield != -1)
|
||||
text += "- Production speed: [production]\n"
|
||||
text += "- Endurance: [endurance]\n"
|
||||
text += "- Lifespan: [lifespan]\n"
|
||||
if(rarity)
|
||||
|
||||
@@ -63,10 +63,7 @@ other types of metals and chemistry for reagents).
|
||||
/obj/item/weapon/disk/design_disk
|
||||
name = "Component Design Disk"
|
||||
desc = "A disk for storing device design data for construction in lathes."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 1
|
||||
icon_state = "datadisk1"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
var/datum/design/blueprint
|
||||
|
||||
|
||||
@@ -105,15 +105,15 @@ research holder datum.
|
||||
for(var/datum/tech/PT in possible_tech)
|
||||
if(TechHasReqs(PT))
|
||||
AddTech2Known(PT)
|
||||
|
||||
|
||||
for(var/datum/design/PD in possible_designs)
|
||||
if(DesignHasReqs(PD))
|
||||
AddDesign2Known(PD)
|
||||
|
||||
|
||||
for(var/v in known_tech)
|
||||
var/datum/tech/T = known_tech[v]
|
||||
T.level = Clamp(T.level, 1, 20)
|
||||
|
||||
|
||||
for(var/v in known_designs)
|
||||
var/datum/design/D = known_designs[v]
|
||||
D.CalcReliability(known_tech)
|
||||
@@ -275,10 +275,7 @@ research holder datum.
|
||||
/obj/item/weapon/disk/tech_disk
|
||||
name = "Technology Disk"
|
||||
desc = "A disk for storing technology data for further research."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 1
|
||||
icon_state = "datadisk0"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
var/datum/tech/stored
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 9.5 KiB |
Reference in New Issue
Block a user