diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index a3a8d563725..b39c71a7d23 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -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" \ No newline at end of file +#define ui_smallquad "EAST-4:22,SOUTH:5" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 2a997afba07..af265268462 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -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 diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index ae0f7f4c474..c9cd99ba45c 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -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 diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index dde89b98ab5..cd9c4044b6a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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)) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 34892beab26..aba84bf0005 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index 7006dd9968a..92d6d03e046 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 276ab699a3e..e69de8b3fdf 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -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 + . = ..() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0c0d39c4fdf..284331ce8cb 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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, "VTEC module disabled.") - speed = 0 - else - to_chat(src, "VTEC module enabled.") - speed = -1 + vtec_active = !vtec_active + hud_used.toggle_vtec_control() + to_chat(src, "VTEC module [vtec_active ? "enabled" : "disabled"].") // update the status screen display /mob/living/silicon/robot/Stat() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/oregrub.dm b/code/modules/mob/living/simple_mob/subtypes/vore/oregrub.dm index 9a13e5e798b..b4a7dc22253 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/oregrub.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/oregrub.dm @@ -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) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/scel.dm b/code/modules/mob/living/simple_mob/subtypes/vore/scel.dm index deef2f06229..7f58ae433a2 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/scel.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/scel.dm @@ -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 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm index 55009d5e90b..c1102a60505 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm @@ -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() ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index db748e732ae..c3c02c228de 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -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 diff --git a/icons/mob/screen1_robot.dmi b/icons/mob/screen1_robot.dmi index 98f475349c8..5e8e0f431af 100644 Binary files a/icons/mob/screen1_robot.dmi and b/icons/mob/screen1_robot.dmi differ