Skip to content

Commit

Permalink
Re-enables borg resizing for Tall/Wide with more aggressive limits (#…
Browse files Browse the repository at this point in the history
…1687) (#2944)

* 1

* nomod nomore

Co-authored-by: Zergspower <[email protected]>
  • Loading branch information
Steals-The-PRs and Zergspower authored Apr 18, 2024
1 parent 67ee118 commit 52cc8f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,12 @@
to_chat(usr, span_warning("This unit already has an expand module installed!"))
return FALSE
// NOVA EDIT BEGIN
if(robot.model.model_select_icon == "nomod")
to_chat(usr, span_warning("Default models cannot take expand or shrink upgrades."))
return FALSE
if((TRAIT_R_WIDE in robot.model.model_features) || (TRAIT_R_TALL in robot.model.model_features))
to_chat(usr, span_warning("This unit's chassis cannot be enlarged any further."))
return FALSE
var/resize_amount = 1.25
if(TRAIT_R_WIDE in robot.model.model_features)
resize_amount = 1.25
if(TRAIT_R_TALL in robot.model.model_features)
resize_amount = 1.05
// NOVA EDIT END

ADD_TRAIT(robot, TRAIT_NO_TRANSFORM, REF(src))
var/prev_lockcharge = robot.lockcharge
robot.SetLockdown(TRUE)
Expand All @@ -579,7 +577,7 @@
robot.set_anchored(FALSE)
REMOVE_TRAIT(robot, TRAIT_NO_TRANSFORM, REF(src))
robot.hasExpanded = TRUE
robot.update_transform(1.5) // NOVA EDIT CHANGE - ORIGINAL: robot.update_transform(2)
robot.update_transform(resize_amount) // NOVA EDIT CHANGE - ORIGINAL: robot.update_transform(2)

/obj/item/borg/upgrade/expand/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
design_ids += list(
"borg_upgrade_clamp",
"borg_upgrade_brush",
"borg_upgrade_shrink",
)
return ..()

Expand Down
3 changes: 1 addition & 2 deletions modular_nova/modules/borgs/code/robot_upgrade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@
if(TRAIT_R_SMALL in borg.model.model_features)
to_chat(usr, span_warning("This unit's chassis cannot be shrunk any further."))
return FALSE

borg.hasShrunk = TRUE
ADD_TRAIT(borg, TRAIT_NO_TRANSFORM, REF(src))
var/prev_lockcharge = borg.lockcharge
Expand All @@ -429,7 +428,7 @@
borg.SetLockdown(FALSE)
borg.set_anchored(FALSE)
REMOVE_TRAIT(borg, TRAIT_NO_TRANSFORM, REF(src))
borg.update_transform(0.75)
borg.update_transform(0.90)

/obj/item/borg/upgrade/shrink/deactivate(mob/living/silicon/robot/borg, user = usr)
. = ..()
Expand Down

0 comments on commit 52cc8f9

Please sign in to comment.