borgs can walk, vtec overhaul, no more borg light and some glow flicker (#15901)

* borgs can walk, no more borg light flicker

* rework vtec

* small oversight on glow

* .
This commit is contained in:
Kashargul
2024-04-07 10:34:06 +10:00
committed by GitHub
parent 3796850a2f
commit cd0cfd0dd7
13 changed files with 85 additions and 36 deletions
+6 -4
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"
@@ -197,4 +199,4 @@
#define ui_mech_deco1_f "WEST+2:-7, SOUTH+8"
#define ui_mech_deco2_f "WEST+2:-7, SOUTH+9"
#define ui_smallquad "EAST-4:22,SOUTH:5"
#define ui_smallquad "EAST-4:22,SOUTH:5"
+2
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
+39 -2
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))
@@ -276,7 +313,7 @@ var/obj/screen/robot_inventory
else
//Modules display is hidden
//r.client.screen -= robot_inventory //"store" icon
for(var/atom/A in r.module.modules)
for(var/atom/A in r.module?.modules)
if(r.client && (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A
+13
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))
@@ -109,7 +109,8 @@
return 0
R.verbs += /mob/living/silicon/robot/proc/toggle_vtec
R.speed = -1
R.vtec_active = TRUE
R.hud_used.toggle_vtec_control()
return 1
/obj/item/borg/upgrade/basic/sizeshift
@@ -403,7 +403,8 @@
blob.rad_glow = CLAMP(radiation,0,250)
set_light(0)
blob.set_light(max(1,min(5,radiation/15)), max(1,min(10,radiation/25)), blob.color)
blob.handle_light()
else
blob.set_light(0)
if(has_hat)
blob.hat = new_hat
new_hat.forceMove(src)
@@ -370,8 +370,8 @@
IgniteMob()
/mob/living/silicon/robot/handle_light()
. = ..()
if(. == FALSE) // If no other light sources are on.
if(lights_on)
set_light(integrated_light_power, 1, "#FFFFFF")
return TRUE
if(lights_on)
set_light(integrated_light_power, 1, "#FFFFFF")
return TRUE
else
. = ..()
@@ -117,6 +117,7 @@
)
var/has_recoloured = FALSE
var/vtec_active = FALSE
/mob/living/silicon/robot/New(loc, var/unfinished = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
@@ -533,12 +534,9 @@
/mob/living/silicon/robot/proc/toggle_vtec()
set name = "Toggle VTEC"
set category = "Abilities"
if(speed == -1)
to_chat(src, "<span class='filter_notice'>VTEC module disabled.</span>")
speed = 0
else
to_chat(src, "<span class='filter_notice'>VTEC module enabled.</span>")
speed = -1
vtec_active = !vtec_active
hud_used.toggle_vtec_control()
to_chat(src, "<span class='filter_notice'>VTEC module [vtec_active ? "enabled" : "disabled"].</span>")
// update the status screen display
/mob/living/silicon/robot/Stat()
@@ -88,6 +88,8 @@
"rad" = 100
)
glow_override = TRUE
/mob/living/simple_mob/vore/oregrub/lava
name = "mature lavagrub"
desc = "A mature, rocky lavagrub"
@@ -141,6 +143,8 @@
if(. == 0 && !is_dead())
set_light(2.5, 1, COLOR_ORANGE)
return 1
else if(is_dead())
glow_override = FALSE
/mob/living/simple_mob/vore/oregrub/lava/death()
set_light(0)
@@ -242,20 +242,3 @@
icon_state = "scel_red"
icon_rest = "scel_red-rest"
random_skin = 0
/mob/living/simple_mob/vore/scel/handle_light()
if(glow_override)
return FALSE
if(instability >= TECHNOMANCER_INSTABILITY_MIN_GLOW)
var/distance = round(sqrt(instability / 2))
if(distance)
set_light(distance, distance * 4, l_color = "#660066")
return TRUE
else if(glow_toggle)
set_light(glow_range, glow_intensity, glow_color)
else
set_light(0)
return FALSE
@@ -53,6 +53,8 @@ List of things solar grubs should be able to do:
var/shock_chance = 10 // Beware
var/tracked = FALSE
glow_override = TRUE
/datum/say_list/solargrub
emote_see = list("squelches", "squishes")
@@ -138,6 +140,8 @@ List of things solar grubs should be able to do:
if(. == 0 && !is_dead())
set_light(2.5, 1, COLOR_YELLOW)
return 1
else if(is_dead())
glow_override = FALSE
/mob/living/simple_mob/vore/solargrub/init_vore()
..()
@@ -51,6 +51,8 @@ var/global/list/grub_machine_overlays = list()
ai_holder_type = /datum/ai_holder/simple_mob/solargrub_larva
glow_override = TRUE
/mob/living/simple_mob/animal/solargrub_larva/New()
..()
existing_solargrubs += src
@@ -186,6 +188,8 @@ var/global/list/grub_machine_overlays = list()
if(. == 0 && !is_dead())
set_light(1.5, 1, COLOR_YELLOW)
return 1
else if(is_dead())
glow_override = FALSE
/obj/machinery/abstract_grub_machine
Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 130 KiB