Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardy Weeds Upgrade Weeds #3709

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
// Weed defines
#define WEED_LEVEL_WEAK 0
#define WEED_LEVEL_STANDARD 1.5
#define WEED_LEVEL_HARDY 1.6
#define WEED_LEVEL_HIVE 4

#define WEED_RANGE_STANDARD 3
Expand Down
26 changes: 13 additions & 13 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -492,36 +492,36 @@
overlay_node = TRUE
overlays += staticnode

/obj/effect/alien/weeds/node/Initialize(mapload, obj/effect/alien/weeds/node/node, mob/living/carbon/xenomorph/X, datum/hive_status/hive)
/obj/effect/alien/weeds/node/Initialize(mapload, obj/effect/alien/weeds/node/node, mob/living/carbon/xenomorph/xeno, datum/hive_status/hive)
if (istype(hive))
linked_hive = hive
else if (istype(X) && X.hive)
linked_hive = X.hive
else if (istype(xeno) && xeno.hive)
linked_hive = xeno.hive
else
linked_hive = GLOB.hive_datum[hivenumber]

for(var/obj/effect/alien/weeds/W in loc)
if(W != src)
if(W.weed_strength > WEED_LEVEL_HIVE)
for(var/obj/effect/alien/weeds/weed in loc)
if(weed != src)
if(weed.weed_strength > WEED_LEVEL_HIVE)
qdel(src)
return
qdel(W) //replaces the previous weed
qdel(weed) //replaces the previous weed
break

. = ..(mapload, src)

if(!staticnode)
staticnode = image('icons/mob/xenos/weeds.dmi', "weednode", ABOVE_OBJ_LAYER)

var/obj/effect/alien/resin/trap/TR = locate() in loc
if(TR)
RegisterSignal(TR, COMSIG_PARENT_PREQDELETED, PROC_REF(trap_destroyed))
var/obj/effect/alien/resin/trap/trap = locate() in loc
if(trap)
RegisterSignal(trap, COMSIG_PARENT_PREQDELETED, PROC_REF(trap_destroyed))
overlay_node = FALSE
overlays -= staticnode

if(X)
add_hiddenprint(X)
weed_strength = X.weed_level
if(xeno)
add_hiddenprint(xeno)
weed_strength = max(weed_strength, xeno.weed_level)
if (weed_strength < WEED_LEVEL_STANDARD)
weed_strength = WEED_LEVEL_STANDARD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@

/obj/effect/alien/weeds/node/gardener
spread_on_semiweedable = TRUE
block_structures = BLOCK_SPECIAL_STRUCTURES
fruit_growth_multiplier = 0.8
weed_strength = WEED_LEVEL_HARDY

/datum/action/xeno_action/verb/verb_plant_gardening_weeds()
set category = "Alien"
Expand Down