Bug fix / refactor-ish to cyborg resting procs (#1657)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Fixes bug caused by
https://github.com/Bubberstation/Bubberstation/pull/1641 not allowing
non small quad cyborgs to change rest states

Adds missing verbs for some cyborgs back.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

<!-- Please make sure to actually test your PRs. If you have not tested
your PR mention it. -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

It fixes a bug I caused sorrwwyy.

## Proof Of Testing

<!-- Compile and run your code locally. Make sure it works. This is the
place to show off your changes! We are not responsible for testing your
features. -->

Not sure how to show it working other than saying I compiled it gave the
missing verbs back that were gone.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
del: dogborgs (they are quadrupeds now)
fix: Verbs not being available to both tall and dog borgs to rest
code: See refactor. Removed dogborg procs(commented them out)
refactor: small quadrupeds, large quadrupeds, and Tall cyborgs resting
verb and how it populates
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->
This commit is contained in:
pixelkitty286
2024-06-28 22:33:26 +02:00
committed by GitHub
parent 5f74a74227
commit 97c8e48187
4 changed files with 40 additions and 14 deletions
@@ -247,12 +247,13 @@
log_silicon("CYBORG: [key_name(cyborg)] has transformed into the [new_model] model.")
//SKYRAT EDIT ADDITION BEGIN - ALTBORGS - Old check for 'dogborg' var no longer necessary, refactored into model_features instead.
new_model.update_dogborg()
//new_model.update_dogborg() // BUBBER REMOVAL
new_model.update_tallborg()
//SKYRAT EDIT ADDITION END
//BUBBER EDIT ADDTION BEGIN
new_model.update_squadruped()
new_model.update_quadruped()
new_model.update_lightweight()
new_model.update_robot_rest()
//BUBBER EDIT ADDTION END
INVOKE_ASYNC(new_model, PROC_REF(do_transform_animation))
@@ -729,9 +729,12 @@
user.bubble_icon = "robot"
active = TRUE
user.update_icons()
user.model.update_dogborg()
//user.model.update_dogborg() //BUBBER REMOVAL
user.model.update_tallborg()
user.model.update_squadruped() //BUBBER ADDITION
//BUBBER EDIT ADDTION BEGIN
user.model.update_quadruped()
user.model.update_robot_rest()
//BUBBER EDIT ADDTION END
if(listeningTo == user)
return
@@ -755,8 +758,12 @@
user.bubble_icon = saved_bubble_icon
active = FALSE
user.update_icons()
user.model.update_dogborg()
//user.model.update_dogborg() //BUBBER REMOVAL
user.model.update_tallborg()
//BUBBER EDIT ADDTION BEGIN
user.model.update_quadruped()
user.model.update_robot_rest()
//BUBBER EDIT ADDTION END
/obj/item/borg_shapeshifter/proc/disrupt(mob/living/silicon/robot/user)
SIGNAL_HANDLER
@@ -14,7 +14,7 @@
if (model_features && (TRAIT_R_TALL in model_features))
cyborg.maptext_height = 48 //Runechat blabla
cyborg.AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 2, -6, sound_vary = TRUE)
add_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
//add_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)// BUBBER REMOVAL - Moved into update_robot_rest()
switch(cyborg_base_icon)
if("mekamine")
cyborg.AddComponent(/datum/component/robot_smoke)
@@ -23,12 +23,13 @@
else
cyborg.maptext_height = initial(cyborg.maptext_height)
cyborg.RemoveElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 2, -6, sound_vary = TRUE)
remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
//remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)// BUBBER REMOVAL - Moved into update_robot_rest()
if(cyborg.GetComponent(/datum/component/robot_smoke))
qdel(cyborg.GetComponent(/datum/component/robot_smoke))
QDEL_NULL(cyborg.particles) // Removing left over particles
//BUBBER REMOVAL BEGIN - replaced with update_quadruped()
/*
/obj/item/robot_model/proc/update_dogborg()
var/mob/living/silicon/robot/cyborg = robot || loc
if (!istype(robot))
@@ -42,6 +43,8 @@
cyborg.set_base_pixel_x(0)
remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
remove_verb(cyborg, /mob/living/silicon/robot/proc/rest_style)
*/
//BUBBER REMOVAL END
//STANDARD
/obj/item/robot_model/standard
@@ -1,18 +1,20 @@
// The actual code to work these in
// Cyborg model types
// Cyborg model trait procs below
//For small quadruped 32 X 32 cyborgs suchs as F3-LINE cyborgs
/obj/item/robot_model/proc/update_squadruped()
//For all quadruped cyborgs
/obj/item/robot_model/proc/update_quadruped()
var/mob/living/silicon/robot/cyborg = robot || loc
if (!istype(robot))
return
if (model_features && (TRAIT_R_SQUADRUPED in model_features))
if (model_features && ((TRAIT_R_SQUADRUPED in model_features) || (TRAIT_R_WIDE in model_features)))
hat_offset = INFINITY
add_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
if (model_features && (TRAIT_R_WIDE in model_features))
cyborg.set_base_pixel_x(-16)
add_verb(cyborg, /mob/living/silicon/robot/proc/rest_style)
else
remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
if (model_features && !(TRAIT_R_WIDE in model_features))
cyborg.set_base_pixel_x(0)
remove_verb(cyborg, /mob/living/silicon/robot/proc/rest_style)
//For cyborgs who have a lighter chassis
@@ -28,6 +30,19 @@
cyborg.can_be_held = FALSE
cyborg.held_w_class = WEIGHT_CLASS_NORMAL
//For cyborgs that can rest
// Must have a resting state!
/obj/item/robot_model/proc/update_robot_rest()
var/mob/living/silicon/robot/cyborg = robot || loc
if (!istype(robot))
return
if (model_features && ((TRAIT_R_SQUADRUPED in model_features) || (TRAIT_R_WIDE in model_features) || (TRAIT_R_TALL in model_features)))
add_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
else
remove_verb(cyborg, /mob/living/silicon/robot/proc/robot_lay_down)
// Cyborg model types below
// Centcom cyborgs
/obj/item/robot_model/centcom
name = "Central Command"