mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
BLOB BUFFS
This commit is contained in:
@@ -93,8 +93,8 @@
|
|||||||
|
|
||||||
/obj/screen/blob/ReadaptStrain
|
/obj/screen/blob/ReadaptStrain
|
||||||
icon_state = "ui_chemswap"
|
icon_state = "ui_chemswap"
|
||||||
name = "Readapt Chemical (40)"
|
name = "Readapt Strain (40)"
|
||||||
desc = "Randomly rerolls your chemical for 40 resources."
|
desc = "Allows you to choose a new strain from 4 random choices for 40 resources."
|
||||||
|
|
||||||
/obj/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
|
/obj/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
|
||||||
if(hud && hud.mymob && isovermind(hud.mymob))
|
if(hud && hud.mymob && isovermind(hud.mymob))
|
||||||
|
|||||||
@@ -22,6 +22,19 @@ GLOBAL_LIST_INIT(valid_blobstrains, subtypesof(/datum/blobstrain) - list(/datum/
|
|||||||
stack_trace("blobstrain created without overmind")
|
stack_trace("blobstrain created without overmind")
|
||||||
overmind = new_overmind
|
overmind = new_overmind
|
||||||
|
|
||||||
|
/datum/blobstrain/proc/on_gain()
|
||||||
|
overmind.color = complementary_color
|
||||||
|
for(var/BL in GLOB.blobs)
|
||||||
|
var/obj/structure/blob/B = BL
|
||||||
|
B.update_icon()
|
||||||
|
for(var/BLO in overmind.blob_mobs)
|
||||||
|
var/mob/living/simple_animal/hostile/blob/BM = BLO
|
||||||
|
BM.update_icons() //If it's getting a new strain, tell it what it does!
|
||||||
|
to_chat(BM, "Your overmind's blob strain is now: <b><font color=\"[color]\">[name]</b></font>!")
|
||||||
|
to_chat(BM, "The <b><font color=\"[color]\">[name]</b></font> strain [shortdesc ? "[shortdesc]" : "[description]"]")
|
||||||
|
|
||||||
|
/datum/blobstrain/proc/on_lose()
|
||||||
|
|
||||||
/datum/blobstrain/proc/on_sporedeath(mob/living/spore)
|
/datum/blobstrain/proc/on_sporedeath(mob/living/spore)
|
||||||
|
|
||||||
/datum/blobstrain/proc/send_message(mob/living/M)
|
/datum/blobstrain/proc/send_message(mob/living/M)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
|||||||
real_name = new_name
|
real_name = new_name
|
||||||
last_attack = world.time
|
last_attack = world.time
|
||||||
var/datum/blobstrain/BS = pick(GLOB.valid_blobstrains)
|
var/datum/blobstrain/BS = pick(GLOB.valid_blobstrains)
|
||||||
blobstrain = new BS(src)
|
set_strain(BS)
|
||||||
color = blobstrain.complementary_color
|
color = blobstrain.complementary_color
|
||||||
if(blob_core)
|
if(blob_core)
|
||||||
blob_core.update_icon()
|
blob_core.update_icon()
|
||||||
@@ -70,6 +70,22 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
|||||||
CRASH("No blobspawnpoints and blob spawned in nullspace.")
|
CRASH("No blobspawnpoints and blob spawned in nullspace.")
|
||||||
forceMove(T)
|
forceMove(T)
|
||||||
|
|
||||||
|
/mob/camera/blob/proc/set_strain(datum/blobstrain/new_strain)
|
||||||
|
if (ispath(new_strain))
|
||||||
|
var/hadstrain = FALSE
|
||||||
|
if (istype(blobstrain))
|
||||||
|
blobstrain.on_lose()
|
||||||
|
qdel(blobstrain)
|
||||||
|
hadstrain = TRUE
|
||||||
|
blobstrain = new new_strain(src)
|
||||||
|
blobstrain.on_gain()
|
||||||
|
if (hadstrain)
|
||||||
|
to_chat(src, "Your strain is now: <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font>!")
|
||||||
|
to_chat(src, "The <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font> strain [blobstrain.description]")
|
||||||
|
if(blobstrain.effectdesc)
|
||||||
|
to_chat(src, "The <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font> strain [blobstrain.effectdesc]")
|
||||||
|
|
||||||
|
|
||||||
/mob/camera/blob/proc/is_valid_turf(turf/T)
|
/mob/camera/blob/proc/is_valid_turf(turf/T)
|
||||||
var/area/A = get_area(T)
|
var/area/A = get_area(T)
|
||||||
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
|
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
|
||||||
|
|||||||
@@ -341,27 +341,22 @@
|
|||||||
set name = "Reactive Strain Adaptation (40)"
|
set name = "Reactive Strain Adaptation (40)"
|
||||||
set desc = "Replaces your strain with a random, different one."
|
set desc = "Replaces your strain with a random, different one."
|
||||||
if(free_strain_rerolls || can_buy(40))
|
if(free_strain_rerolls || can_buy(40))
|
||||||
set_strain()
|
reroll_strain()
|
||||||
if(free_strain_rerolls)
|
if(free_strain_rerolls)
|
||||||
free_strain_rerolls--
|
free_strain_rerolls--
|
||||||
last_reroll_time = world.time
|
last_reroll_time = world.time
|
||||||
|
|
||||||
/mob/camera/blob/proc/set_strain()
|
/mob/camera/blob/proc/reroll_strain()
|
||||||
var/datum/blobstrain/bs = pick((GLOB.valid_blobstrains - blobstrain.type))
|
var/list/choices = list()
|
||||||
blobstrain = new bs(src)
|
while (length(choices) < 4)
|
||||||
color = blobstrain.complementary_color
|
var/datum/blobstrain/bs = pick((GLOB.valid_blobstrains))
|
||||||
for(var/BL in GLOB.blobs)
|
choices[initial(bs.name)] = bs
|
||||||
var/obj/structure/blob/B = BL
|
|
||||||
B.update_icon()
|
var/choice = input(usr, "Please choose a new strain","Strain") as anything in choices
|
||||||
for(var/BLO in blob_mobs)
|
if (choice && choices[choice] && !QDELETED(src))
|
||||||
var/mob/living/simple_animal/hostile/blob/BM = BLO
|
var/datum/blobstrain/bs = choices[choice]
|
||||||
BM.update_icons() //If it's getting a new strain, tell it what it does!
|
set_strain(bs)
|
||||||
to_chat(BM, "Your overmind's blob strain is now: <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font>!")
|
|
||||||
to_chat(BM, "The <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font> strain [blobstrain.shortdesc ? "[blobstrain.shortdesc]" : "[blobstrain.description]"]")
|
|
||||||
to_chat(src, "Your strain is now: <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font>!")
|
|
||||||
to_chat(src, "The <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font> strain [blobstrain.description]")
|
|
||||||
if(blobstrain.effectdesc)
|
|
||||||
to_chat(src, "The <b><font color=\"[blobstrain.color]\">[blobstrain.name]</b></font> strain [blobstrain.effectdesc]")
|
|
||||||
|
|
||||||
/mob/camera/blob/verb/blob_help()
|
/mob/camera/blob/verb/blob_help()
|
||||||
set category = "Blob"
|
set category = "Blob"
|
||||||
|
|||||||
Reference in New Issue
Block a user