[MIRROR] borgs can walk, vtec overhaul, no more borg light and some glow flicker (#8179)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-04-06 23:28:26 -07:00
committed by GitHub
parent f49be853cc
commit 58db30b265
13 changed files with 83 additions and 36 deletions

View File

@@ -58,9 +58,11 @@
#define ui_zonesel "EAST-1:28,SOUTH:5"
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_borg_pull "EAST-3:24,SOUTH+1:7"
#define ui_borg_module "EAST-2:26,SOUTH+1:7"
#define ui_borg_panel "EAST-1:28,SOUTH+1:7"
#define ui_borg_pull "EAST-4:24,SOUTH+1:7" //borgs
#define ui_borg_radio "EAST-2:26,SOUTH+1:7" //borgs
#define ui_borg_panel "EAST-1:28,SOUTH+1:7" //borgs
#define ui_borg_module "EAST-3:24,SOUTH+1:5"//borgs
#define ui_vtec_control "EAST-3:24,SOUTH:5"//borgs
#define ui_ai_core "SOUTH:6,WEST:16"
#define ui_ai_camera_list "SOUTH:6,WEST+1:16"

View File

@@ -176,6 +176,7 @@ var/list/global_huds = list(
var/obj/screen/l_hand_hud_object
var/obj/screen/action_intent
var/obj/screen/move_intent
var/obj/screen/control_vtec
var/list/adding
/// Misc hud elements that are hidden when the hud is minimized
@@ -219,6 +220,7 @@ var/list/global_huds = list(
l_hand_hud_object = null
action_intent = null
move_intent = null
control_vtec = null
adding = null
other = null
other_important = null

View File

@@ -25,7 +25,7 @@ var/obj/screen/robot_inventory
using.color = HUD.ui_color
using.alpha = HUD.ui_alpha
using.icon_state = "radio"
using.screen_loc = ui_movi
using.screen_loc = ui_borg_radio
using.layer = HUD_LAYER
adding += using
@@ -81,6 +81,17 @@ var/obj/screen/robot_inventory
adding += using
HUD.action_intent = using
//Move intent (walk/run)
using = new /obj/screen()
using.name = "mov_intent"
using.icon = HUD.ui_style
using.icon_state = (m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.color = HUD.ui_color
using.alpha = HUD.ui_alpha
HUD.adding += using
HUD.move_intent = using
//Health
healths = new /obj/screen()
healths.icon = HUD.ui_style
@@ -206,6 +217,32 @@ var/obj/screen/robot_inventory
client.screen += HUD.adding + HUD.other
client.screen += client.void
/datum/hud/proc/toggle_vtec_control()
if(!isrobot(mymob))
return
var/mob/living/silicon/robot/R = mymob
if(!control_vtec)
var/obj/screen/using = new /obj/screen()
using.name = "control_vtec"
using.icon = ui_style
using.screen_loc = ui_vtec_control
using.color = ui_color
using.alpha = ui_alpha
control_vtec = using
if(R.vtec_active)
if(R.speed == 0)
control_vtec.icon_state = "speed_0"
else if(R.speed == -0.5)
control_vtec.icon_state = "speed_1"
else if(R.speed == -1)
control_vtec.icon_state = "speed_2"
R.m_intent = "run"
R.hud_used.move_intent.icon_state = "running"
R.client.screen += control_vtec
else
R.client.screen -= control_vtec
R.speed = 0
/datum/hud/proc/toggle_show_robot_modules()
if(!isrobot(mymob))

View File

@@ -272,6 +272,19 @@
var/mob/living/L = usr
L.resist()
if("control_vtec")
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
if(R.speed == 0 && R.vtec_active)
R.speed = -0.5
R.hud_used.control_vtec.icon_state = "speed_1"
else if(R.speed == -0.5 && R.vtec_active)
R.speed = -1
R.hud_used.control_vtec.icon_state = "speed_2"
else
R.speed = 0
R.hud_used.control_vtec.icon_state = "speed_0"
if("mov_intent")
if(isliving(usr))
if(iscarbon(usr))