Skip to content

Commit

Permalink
tweak: Kudzu tweaks (#6169)
Browse files Browse the repository at this point in the history
* ботаникаотделдляпидорасов

* тзишуйприводиткимпотенции

* щепочкаподcockтролем

* а нахуй он нужен был? ебись оно в рот

* dikaya dorabotochka

---------

Co-authored-by: Antoonij <[email protected]>
  • Loading branch information
chomasuke and Antoonij authored Nov 22, 2024
1 parent cd9700c commit 4665f3e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
27 changes: 20 additions & 7 deletions code/modules/events/spacevine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
#define NEGATIVE 2
#define MINOR_NEGATIVE 3

/datum/event/spacevine
announceWhen = 120
var/obj/structure/spacevine_controller/SC

/datum/event/spacevine/Destroy(force)
SC = null
return ..()

/datum/event/spacevine/start()
var/list/turfs = list() //list of all the empty floor turfs in the hallway areas

Expand All @@ -17,7 +25,7 @@

if(turfs.len) //Pick a turf to spawn at if we can
var/turf/T = pick(turfs)
var/obj/structure/spacevine_controller/SC = new /obj/structure/spacevine_controller(T, , rand(30,70),rand(5,2)) //spawn a controller at turf
SC = new /obj/structure/spacevine_controller(T, null, rand(30, 70), rand(5, 2)) // spawn a controller at turf

// Make the event start fun - give the vine a random hostile mutation
if(SC.vines.len)
Expand All @@ -31,6 +39,9 @@
mutations.Cut()
mutations = null

/datum/event/spacevine/announce(false_alarm)
if((false_alarm || LAZYLEN(SC?.vines)) && (LAZYLEN(GLOB.player_list) < 20))
GLOB.event_announcement.Announce("Биосканеры фиксируют рост космической лозы в [get_area(SC.loc)]. Избавьтесь от неё, прежде чем она нанесёт ущерб станции.", "ВНИМАНИЕ: БИОЛОГИЧЕСКАЯ УГРОЗА.")

/datum/spacevine_mutation
var/name = ""
Expand Down Expand Up @@ -366,7 +377,7 @@
hue = "#444444"
quality = POSITIVE
severity = 3
var/drop_rate = 20
var/drop_rate = 40
var/list/mineral_results = list(
/obj/item/stack/sheet/metal = 1
)
Expand All @@ -381,7 +392,7 @@
/datum/spacevine_mutation/mineral/valuables
name = "glimmering"
hue = "#888800"
drop_rate = 10
drop_rate = 20
mineral_results = list(
/obj/item/stack/sheet/mineral/silver = 4,
/obj/item/stack/sheet/mineral/gold = 2,
Expand Down Expand Up @@ -577,17 +588,18 @@
var/spread_multiplier = 5
var/spread_cap = 30
var/list/mutations_list = list()
var/mutativeness = 1
var/mutativeness = 0

/obj/structure/spacevine_controller/New(loc, list/muts, potency, production)
color = "#ffffff"
spawn_spacevine_piece(loc, null, muts)
START_PROCESSING(SSobj, src)
init_subtypes(/datum/spacevine_mutation/, mutations_list)
if(potency != null && potency > 0)
// 1 mutativeness at 10 potency
// 4 mutativeness at 100 potency
// 1 mutativeness at 10 potency
// 4 mutativeness at 100 potency
if(potency)
mutativeness = log(10, potency) ** 2

if(production != null)
// 1 production is crazy powerful
var/spread_value = max(10 - production, 1)
Expand All @@ -597,6 +609,7 @@
// 6 vines/spread at 6 production
// ~2.5 vines/spread at 1 production
spread_multiplier /= spread_value / 5

..()


Expand Down
11 changes: 11 additions & 0 deletions code/modules/hydroponics/grown/kudzu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
qdel(src)
return TRUE

/obj/item/seeds/kudzu/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/seeds/kudzu))
var/obj/item/seeds/kudzu/AttackerSeed = I
mutations |= AttackerSeed.mutations

add_fingerprint(user)
qdel(I)
return ATTACK_CHAIN_BLOCKED_ALL

return ..()

/obj/item/seeds/kudzu/attack_self(mob/user)
if(plant(user))
to_chat(user, "<span class='notice'>You plant the kudzu. You monster.</span>")
Expand Down

0 comments on commit 4665f3e

Please sign in to comment.