mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
+37






![tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)


Alexis
GitHub
tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
ArcaneMusic
MrMelbert
Rhials
rageguy505
LemonInTheDark
John Willard
Aliceee2ch
Time-Green
Tsar-Salat
SmArtKar
Maxipat
SyncIt21
deltanedas
SimplyLogan
loganuk
Leland Kemble
FalloutFalcon
Roxy
Lucy
siliconOpossum
Isratosh
TheRyeGuyWhoWillNowDie
Neocloudy
Alexander V.
ElGitificador
Twaticus
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bloop
Cameron Lennox
Tim
Iamgoofball
Layzu666
Arturlang
_0Steven
mrmanlikesbt
Ben10Omintrix
John F. Kennedy
Cursor
Josh
Josh Powell
Yobrocharlie
Hardly3D
shayoki
LT3
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
128 lines
4.4 KiB
Plaintext
128 lines
4.4 KiB
Plaintext
/mob/living/silicon/robot/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE)
|
|
. = ..()
|
|
if(robot_resting)
|
|
robot_resting = FALSE
|
|
on_standing_up()
|
|
update_icons()
|
|
|
|
/mob/living/silicon/robot/toggle_resting()
|
|
robot_lay_down()
|
|
|
|
/mob/living/silicon/robot/on_lying_down(new_lying_angle)
|
|
if(layer == initial(layer)) //to avoid things like hiding larvas.
|
|
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
|
density = FALSE // We lose density and stop bumping passable dense things.
|
|
|
|
if(model && model.model_features && ((TRAIT_R_TALL in model.model_features) || (TRAIT_R_BIG in model.model_features)))
|
|
maptext_height = 32 //Offset base chat-height value
|
|
|
|
// Resting effects
|
|
var/turf/sit_pos = get_turf(src)
|
|
var/obj/structure/table/tabled = locate(/obj/structure/table) in sit_pos.contents
|
|
if(!tabled)
|
|
new /obj/effect/temp_visual/mook_dust/robot(get_turf(src))
|
|
playsound(src, 'modular_skyrat/master_files/sound/effects/robot_sit.ogg', 25, TRUE)
|
|
return
|
|
else
|
|
new /obj/effect/temp_visual/mook_dust/robot/table(get_turf(src))
|
|
playsound(src, 'modular_skyrat/master_files/sound/effects/robot_bump.ogg', 50, TRUE)
|
|
|
|
var/list/items_to_move = list()
|
|
|
|
for(var/obj/item/gen_item in sit_pos.contents)
|
|
if(!gen_item.anchored)
|
|
items_to_move += gen_item
|
|
if(items_to_move.len >= 8)
|
|
break
|
|
|
|
for(var/obj/item/table_contents in items_to_move)
|
|
|
|
table_contents.throw_at(get_ranged_target_turf(table_contents, pick(GLOB.cardinals), range = 1), range = 1, speed = 1)
|
|
|
|
|
|
/mob/living/silicon/robot/on_standing_up()
|
|
if(layer == LYING_MOB_LAYER)
|
|
layer = initial(layer)
|
|
density = initial(density) // We were prone before, so we become dense and things can bump into us again.
|
|
if(model && model.model_features && (TRAIT_R_TALL in model.model_features))
|
|
maptext_height = 48 //Offset value of tallborgs
|
|
if(model && model.model_features && (TRAIT_R_BIG in model.model_features))
|
|
maptext_height = 64
|
|
|
|
/mob/living/silicon/robot/proc/rest_style()
|
|
set name = "Switch Rest Style"
|
|
set category = "AI Commands"
|
|
set desc = "Select your resting pose."
|
|
if(!can_rest())
|
|
to_chat(src, span_warning("You can't do that!"))
|
|
return
|
|
var/choice = tgui_alert(src, "Select resting pose", "", list("Resting", "Sitting", "Belly up"))
|
|
switch(choice)
|
|
if("Resting")
|
|
robot_rest_style = ROBOT_REST_NORMAL
|
|
if("Sitting")
|
|
robot_rest_style = ROBOT_REST_SITTING
|
|
if("Belly up")
|
|
robot_rest_style = ROBOT_REST_BELLY_UP
|
|
robot_resting = robot_rest_style
|
|
if (robot_resting)
|
|
on_lying_down()
|
|
update_icons()
|
|
|
|
/mob/living/silicon/robot/proc/robot_lay_down()
|
|
set name = "Lay down"
|
|
set category = "AI Commands"
|
|
if(!can_rest())
|
|
to_chat(src, span_warning("You can't do that!"))
|
|
return
|
|
if(stat != CONSCIOUS) //Make sure we don't enable movement when not concious
|
|
return
|
|
if(robot_resting)
|
|
to_chat(src, span_notice("You are now getting up."))
|
|
robot_resting = FALSE
|
|
mobility_flags = MOBILITY_FLAGS_DEFAULT
|
|
on_standing_up()
|
|
else
|
|
to_chat(src, span_notice("You are now laying down."))
|
|
robot_resting = robot_rest_style
|
|
on_lying_down()
|
|
update_icons()
|
|
|
|
/mob/living/silicon/robot/update_resting()
|
|
. = ..()
|
|
if(can_rest())
|
|
robot_resting = FALSE
|
|
update_icons()
|
|
|
|
/mob/living/silicon/robot/update_worn_icons()
|
|
if(!hat_overlay)
|
|
return
|
|
cut_overlay(hat_overlay)
|
|
|
|
var/list/offset_list = ((robot_resting && model.rest_hat_offset) ? model.rest_hat_offset : model.hat_offset)
|
|
if(islist(offset_list))
|
|
var/list/offset = offset_list[ISDIAGONALDIR(dir) ? dir2text(dir & (WEST|EAST)) : dir2text(dir)]
|
|
if(offset)
|
|
hat_overlay.pixel_w = offset[1]
|
|
hat_overlay.pixel_z = offset[2]
|
|
|
|
add_overlay(hat_overlay)
|
|
|
|
/mob/living/silicon/robot/update_module_innate()
|
|
..()
|
|
var/atom/movable/screen/robot_hands = hud_used?.screen_objects[HUD_CYBORG_HANDS]
|
|
if(robot_hands)
|
|
robot_hands.icon = (model.model_select_alternate_icon ? model.model_select_alternate_icon : initial(robot_hands.icon))
|
|
|
|
/**
|
|
* Safe check of the cyborg's model_features list.
|
|
*
|
|
* model_features is defined in modular_skyrat\modules\altborgs\code\modules\mob\living\silicon\robot\robot_model.dm.
|
|
*/
|
|
/mob/living/silicon/robot/proc/can_rest()
|
|
if(model && model.model_features && ((TRAIT_R_WIDE in model.model_features) || (TRAIT_R_TALL in model.model_features) || (TRAIT_R_SQUADRUPED in model.model_features) || (TRAIT_R_BIG in model.model_features)))
|
|
if(TRAIT_IMMOBILIZED in _status_traits)
|
|
return FALSE
|
|
return TRUE
|
|
return FALSE
|