Skip to content
Open
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
2 changes: 2 additions & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@
#define WALL_THICKRESIN "thickresin"
#define WALL_WEEDBOUND_RESIN "weedboundresin"
#define WALL_THICK_WEEDBOUND_RESIN "thickweedboundresin"
#define WALL_NODEBOUND_RESIN "nodeboundresin"
#define WALL_THICK_NODEBOUND_RESIN "thicknodeboundresin"
#define WALL_MEMBRANE "membrane"
#define WALL_THICKMEMBRANE "thickmembrane"
#define WALL_BONE_RESIN "bone_resin"
Expand Down
6 changes: 4 additions & 2 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@
blend_turfs = list(/turf/closed/wall/resin)
blend_objects = list(/obj/structure/mineral_door/resin)
repair_materials = list()
var/destroy_override = FALSE
var/hivenumber = XENO_HIVE_NORMAL
var/should_track_build = FALSE
var/upgrading_now = FALSE //flag to track upgrading/thickening process
Expand All @@ -871,8 +872,9 @@
/turf/closed/wall/resin/Initialize(mapload)
. = ..()

for(var/obj/effect/alien/weeds/node/weed_node in contents)
qdel(weed_node)
if(!destroy_override)
for(var/obj/effect/alien/weeds/node/weed_node in contents)
qdel(weed_node)

if(hivenumber == XENO_HIVE_NORMAL)
RegisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING, PROC_REF(forsaken_handling))
Expand Down
11 changes: 10 additions & 1 deletion code/modules/client/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ CLIENT_VERB(toggle_custom_cursors)
do_toggle_custom_cursors()

/client/proc/do_toggle_custom_cursors(mob/user)
var/result = tgui_alert(user, "Do you want custom cursors enabled?", "Custom Cursors", list("Yes", "No", "Enable Main Cursor", "Disable Main Cursor"))
var/result = tgui_alert(user, "Do you want custom cursors enabled?", "Custom Cursors", list("Yes", "No", "Enable Main Cursor", "Disable Main Cursor", "Enable Ability Cursor", "Disable Ability Cursor"))
if(!result)
return
switch(result)
Expand Down Expand Up @@ -616,6 +616,15 @@ CLIENT_VERB(toggle_custom_cursors)
to_chat(src, SPAN_NOTICE("You're no longer using custom cursors."))
mouse_pointer_icon = initial(mouse_pointer_icon)
prefs.save_preferences()
if("Enable Ability Cursor")
prefs.custom_cursors = TRUE
to_chat(src, SPAN_NOTICE("Your ability cursor will now be visible."))
prefs.save_preferences()
if("Disable Ability Cursor")
prefs.custom_cursors = FALSE
to_chat(src, SPAN_NOTICE("Your ability cursor will no longer be visible."))
mouse_pointer_icon = initial(mouse_pointer_icon)
prefs.save_preferences()
if("Enable Main Cursor")
prefs.main_cursor = TRUE
to_chat(src, SPAN_NOTICE("Your main cursor will now be customized."))
Expand Down
28 changes: 28 additions & 0 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -676,4 +676,32 @@
/obj/effect/resin_construct/transparent/weak
icon_state = "WeakTransparentConstruct"

/obj/effect/resin_construct/fastweak
icon_state = "WeakReflectiveFast"

/obj/effect/resin_construct/speed_node
icon_state = "speednode"

/obj/effect/resin_construct/cost_node
icon_state = "costnode"

/obj/effect/resin_construct/construct_node
icon_state = "constructnode"

/obj/effect/resin_construct/construct_doorslow
icon_state = "BoundDoorSlow"

/obj/effect/resin_construct/construct_wallslow
icon_state = "BoundWallSlow"

/obj/effect/resin_construct/thickfast
icon_state = "ThickConstructFast"

/obj/effect/resin_construct/thickdoorfast
icon_state = "ThickDoorConstructFast"
layer = FIREDOOR_CLOSED_LAYER

/obj/effect/resin_construct/transparent/thickfast
icon_state = "WeakTransparentConstructFast"

#undef WEED_BASE_GROW_SPEED
9 changes: 4 additions & 5 deletions code/modules/mob/living/carbon/xenomorph/Powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
if(total_resin_cost > plasma_max && (XENO_RESIN_BASE_COST + resin_construct.cost) < plasma_max)
total_resin_cost = plasma_max

var/turf/current_turf = get_turf(target)

if(action_busy && !can_stack_builds)
return SECRETE_RESIN_FAIL
if(!check_state())
return SECRETE_RESIN_FAIL
for(var/obj/effect/alien/resin/design/cost_node/cn in current_turf.contents)
total_resin_cost -= (total_resin_cost / 2)
if(use_plasma && !check_plasma(total_resin_cost))
return SECRETE_RESIN_FAIL
if(SSinterior.in_interior(src))
Expand All @@ -31,8 +35,6 @@
to_chat(src, SPAN_XENOWARNING("We've already built the maximum possible structures we can!"))
return SECRETE_RESIN_FAIL

var/turf/current_turf = get_turf(target)

if(extra_build_dist != IGNORE_BUILD_DISTANCE && get_dist(src, target) > src.caste.max_build_dist + extra_build_dist) // Hivelords and eggsac carriers have max_build_dist of 1, drones and queens 0
to_chat(src, SPAN_XENOWARNING("We can't build from that far!"))
return SECRETE_RESIN_FAIL
Expand Down Expand Up @@ -103,9 +105,6 @@
for(var/obj/effect/alien/resin/design/speed_node/sn in current_turf.contents)
wait_time -= ((resin_construct.build_time * caste.build_time_mult) / 2)

for(var/obj/effect/alien/resin/design/cost_node/cn in current_turf.contents)
total_resin_cost -= (total_resin_cost / 2)

if(!resin_construct.can_build_here(current_turf, src))
return SECRETE_RESIN_FAIL

Expand Down
39 changes: 36 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
var/plasmapool_modifier = 1
var/plasmagain_modifier = 0
var/tackle_chance_modifier = 0
var/tacklestrength_min_modifier = 0
var/tacklestrength_max_modifier = 0
var/regeneration_multiplier = 1
var/speed_modifier = 0
var/phero_modifier = 0
Expand Down Expand Up @@ -312,11 +314,15 @@
var/obj/effect/alien/resin/fruit/selected_fruit = null
var/list/built_structures = list()

// Designer stuff
/// the typepath of the designer placeable we wanna put down.
var/obj/effect/alien/resin/design/selected_design = null
/// List of available design marks for this designer.
var/list/available_design = list()
/// Stores the current design nodes placed by the designer.
var/list/current_design = list()
/// Maximum design nodes the designer can place.
var/max_design_nodes = 0
/// Currently selected design mark to place
var/selected_design_mark

var/icon_xeno
Expand All @@ -328,6 +334,9 @@

bubble_icon = "alien"

/// Custom action mouse cursor
var/active_action_cursor

/////////////////////////////////////////////////////////////////////
//
// Phero related vars
Expand Down Expand Up @@ -592,6 +601,30 @@
if(fire_immunity & FIRE_IMMUNITY_XENO_FRENZY)
. |= COMPONENT_XENO_FRENZY

/mob/living/carbon/xenomorph/proc/set_action_cursor(mouse_pointer)
if(!client)
return
if(active_action_cursor)
UnregisterSignal(client, COMSIG_CLIENT_RESET_VIEW)
if(!client.prefs.custom_cursors)
return
active_action_cursor = mouse_pointer
client.mouse_pointer_icon = mouse_pointer
RegisterSignal(client, COMSIG_CLIENT_RESET_VIEW, PROC_REF(handle_view))

/mob/living/carbon/xenomorph/proc/clear_action_cursor()
if(!client)
return
active_action_cursor = null
client.mouse_pointer_icon = null
UnregisterSignal(client, COMSIG_CLIENT_RESET_VIEW)

/mob/living/carbon/xenomorph/proc/handle_view(client/user)
SIGNAL_HANDLER
if(active_action_cursor)
if(user?.prefs?.custom_cursors)
user.mouse_pointer_icon = active_action_cursor

//Off-load this proc so it can be called freely
//Since Xenos change names like they change shoes, we need somewhere to hammer in all those legos
//We set their name first, then update their real_name AND their mind name
Expand Down Expand Up @@ -924,8 +957,8 @@
tackle_min = caste.tackle_min
tackle_max = caste.tackle_max
tackle_chance = caste.tackle_chance + tackle_chance_modifier
tacklestrength_min = caste.tacklestrength_min
tacklestrength_max = caste.tacklestrength_max
tacklestrength_min = caste.tacklestrength_min + tacklestrength_min_modifier
tacklestrength_max = caste.tacklestrength_max + tacklestrength_max_modifier

/mob/living/carbon/xenomorph/proc/recalculate_health()
var/new_max_health = nocrit ? health_modifier + maxHealth : health_modifier + caste.max_health
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*/

/mob/living/carbon/xenomorph/proc/set_selected_ability(datum/action/xeno_action/activable/ability)
if(active_action_cursor && active_action_cursor != ability)
clear_action_cursor()
if(selected_ability)
selected_ability.on_deselect(src)
if(!ability)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,14 @@
if(!SSmapping.same_z_map(target.z, xeno_owner.z))
to_chat(owner, SPAN_XENOWARNING("This area is too far away to affect!"))
return

var/build_on_design = FALSE
var/turf/target_turf = get_turf(target)
if(target_turf)
for(var/obj/effect/alien/resin/design/target_design in target_turf)
build_on_design = TRUE
apply_cooldown()

switch(xeno_owner.build_resin(target, thick, make_message, plasma_cost != 0, build_speed_mod))
if(SECRETE_RESIN_INTERRUPT)
if(xeno_cooldown)
Expand All @@ -273,6 +280,10 @@
if(xeno_cooldown)
apply_cooldown_override(xeno_cooldown_fail)
return FALSE
if(SECRETE_RESIN_SUCCESS)
if(build_on_design)
apply_cooldown_override()
return TRUE
return TRUE

// leader Marker
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/datum/action/xeno_action/verb/verb_change_design()
set category = "Alien"
set name = "Change Design Mark"
set hidden = TRUE
var/action_name = "Change Design Mark"
handle_xeno_macro(src, action_name)

/datum/action/xeno_action/verb/place_design()
set category = "Alien"
set name = "Place Design"
set hidden = TRUE
var/action_name = "Place Design"
handle_xeno_macro(src, action_name)

/datum/action/xeno_action/verb/verb_toggle_design_icons()
set category = "Alien"
set name = "Change Design Mark"
set hidden = TRUE
var/action_name = "Change Design Mark"
handle_xeno_macro(src, action_name)

/datum/action/xeno_action/verb/verb_greater_surge()
set category = "Alien"
set name = "Greater Resin Surge"
set hidden = TRUE
var/action_name = "Greater Resin Surge"
handle_xeno_macro(src, action_name)

Loading
Loading