mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Drone Eye Fixes (#10741)
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
req_access = list(access_mining, access_robotics)
|
||||
id_card_type = /obj/item/card/id/minedrone
|
||||
speed = -1
|
||||
hat_x_offset = 1
|
||||
hat_y_offset = -12
|
||||
var/seeking_player = FALSE
|
||||
var/health_upgrade
|
||||
var/ranged_upgrade
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
|
||||
// Hats!
|
||||
var/obj/item/hat
|
||||
var/image/hat_overlay
|
||||
var/hat_x_offset = 0
|
||||
var/hat_y_offset = -13
|
||||
|
||||
@@ -111,6 +112,7 @@
|
||||
if(hat)
|
||||
hat.forceMove(get_turf(src))
|
||||
hat = null
|
||||
QDEL_NULL(hat_overlay)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/drone/construction
|
||||
@@ -157,7 +159,6 @@
|
||||
C.max_damage = 10
|
||||
|
||||
verbs -= /mob/living/silicon/robot/verb/Namepick
|
||||
update_icon()
|
||||
density = FALSE
|
||||
|
||||
/mob/living/silicon/robot/drone/init()
|
||||
@@ -181,15 +182,24 @@
|
||||
real_name = "maintenance drone ([rand(100,999)])"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/update_icon()
|
||||
cut_overlays()
|
||||
if(stat == CONSCIOUS && isturf(loc))
|
||||
if(!emagged)
|
||||
add_overlay("eyes-[icon_state]")
|
||||
else
|
||||
add_overlay("eyes-[icon_state]-emag")
|
||||
if(hat) // Let the drones wear hats.
|
||||
add_overlay(get_hat_icon(hat, hat_x_offset, hat_y_offset))
|
||||
/mob/living/silicon/robot/drone/setup_icon_cache()
|
||||
cached_eye_overlays = list(
|
||||
I_HELP = image(icon, "eyes-[icon_state]-help", layer = EFFECTS_ABOVE_LIGHTING_LAYER),
|
||||
I_HURT = image(icon, "eyes-[icon_state]-harm", layer = EFFECTS_ABOVE_LIGHTING_LAYER),
|
||||
"emag" = image(icon, "eyes-[icon_state]-emag", layer = EFFECTS_ABOVE_LIGHTING_LAYER)
|
||||
)
|
||||
if(eye_overlay)
|
||||
cut_overlay(eye_overlay)
|
||||
eye_overlay = cached_eye_overlays[a_intent]
|
||||
if(!stat)
|
||||
add_overlay(eye_overlay)
|
||||
|
||||
/mob/living/silicon/robot/drone/set_intent(var/set_intent)
|
||||
a_intent = set_intent
|
||||
cut_overlay(eye_overlay)
|
||||
if(!stat)
|
||||
eye_overlay = cached_eye_overlays[emagged ? "emag" : set_intent]
|
||||
add_overlay(eye_overlay)
|
||||
|
||||
/mob/living/silicon/robot/drone/choose_icon()
|
||||
return
|
||||
@@ -202,7 +212,8 @@
|
||||
return
|
||||
hat = new_hat
|
||||
new_hat.forceMove(src)
|
||||
update_icon()
|
||||
hat_overlay = get_hat_icon(hat, hat_x_offset, hat_y_offset)
|
||||
add_overlay(hat_overlay)
|
||||
|
||||
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
|
||||
/mob/living/silicon/robot/drone/attackby(var/obj/item/W, var/mob/user)
|
||||
@@ -271,7 +282,7 @@
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(src)
|
||||
to_chat(src, SPAN_DANGER("ALERT: [user.real_name] is your new master. Obey your new laws and their commands."))
|
||||
update_icon()
|
||||
set_intent(I_HURT) // force them to hurt to update the eyes, they can swap to and fro if they wish, though - geeves
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/ai_hack(var/mob/user)
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
H.put_in_hands(hat)
|
||||
H.visible_message(SPAN_WARNING("\The [H] removes \the [src]'s [hat]."))
|
||||
hat = null
|
||||
cut_overlay(hat_overlay)
|
||||
QDEL_NULL(hat_overlay)
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
7
html/changelogs/geeves-mining_drone_eyes.yml
Normal file
7
html/changelogs/geeves-mining_drone_eyes.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Fixed maintenance-, mining-, and construction drones having weird lit up eyes. They should now update correctly."
|
||||
- bugfix: "Fixed the hat overlay of mining drones."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB After Width: | Height: | Size: 509 KiB |
Reference in New Issue
Block a user