mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 15:02:56 +00:00
Robot Code Overhaul (#9304)
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
to_chat(user, "<span class='warning'>Error: Power levels insufficient.</span>")
|
||||
|
||||
if(user != src)
|
||||
a_intent = user.a_intent
|
||||
set_intent(user.a_intent)
|
||||
if(user.zone_sel)
|
||||
zone_sel.set_selected_zone(user.zone_sel.selecting)
|
||||
else
|
||||
@@ -272,7 +272,7 @@
|
||||
user.client.screen -= hud_elements
|
||||
user.client.eye = user
|
||||
if(user in pilots)
|
||||
a_intent = I_HURT
|
||||
set_intent(I_HURT)
|
||||
LAZYREMOVE(pilots, user)
|
||||
UNSETEMPTY(pilots)
|
||||
update_pilot_overlay()
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
if(target.Adjacent(src))
|
||||
if(istype(target, /mob/living/silicon)) // Glomp the silicons
|
||||
if(!Atkcool)
|
||||
a_intent = I_HURT
|
||||
set_intent(I_HURT)
|
||||
UnarmedAttack(target)
|
||||
Atkcool = TRUE
|
||||
spawn(45)
|
||||
@@ -327,12 +327,12 @@
|
||||
spawn(45)
|
||||
Atkcool = FALSE
|
||||
|
||||
a_intent = I_DISARM
|
||||
set_intent(I_DISARM)
|
||||
UnarmedAttack(target)
|
||||
|
||||
else
|
||||
if(!Atkcool)
|
||||
a_intent = I_GRAB
|
||||
set_intent(I_GRAB)
|
||||
UnarmedAttack(target)
|
||||
|
||||
else if(target in view(7, src))
|
||||
@@ -350,9 +350,9 @@
|
||||
frenemy = S
|
||||
if(frenemy && prob(1))
|
||||
if(frenemy.colour == colour)
|
||||
a_intent = I_HELP
|
||||
set_intent(I_HELP)
|
||||
else
|
||||
a_intent = I_HURT
|
||||
set_intent(I_HURT)
|
||||
UnarmedAttack(frenemy)
|
||||
|
||||
var/sleeptime = movement_delay()
|
||||
@@ -365,11 +365,11 @@
|
||||
/mob/living/carbon/slime/proc/handle_speech_and_mood()
|
||||
//Mood starts here
|
||||
var/newmood = ""
|
||||
a_intent = I_HELP
|
||||
set_intent(I_HELP)
|
||||
if(rabid || attacked)
|
||||
set_content(FALSE)
|
||||
newmood = ANGRY
|
||||
a_intent = I_HURT
|
||||
set_intent(I_HURT)
|
||||
else if(target)
|
||||
newmood = MISCHIEVOUS
|
||||
|
||||
|
||||
@@ -24,67 +24,36 @@
|
||||
return
|
||||
|
||||
if(module_state_1 == module_active)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
module_active = null
|
||||
module_state_1:loc = module //So it can be used again later
|
||||
store_module(module_state_1)
|
||||
set_module_active(null)
|
||||
module_state_1 = null
|
||||
inv1.icon_state = "inv1"
|
||||
else if(module_state_2 == module_active)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_active = null
|
||||
module_state_2:loc = module
|
||||
store_module(module_state_2)
|
||||
set_module_active(null)
|
||||
module_state_2 = null
|
||||
inv2.icon_state = "inv2"
|
||||
else if(module_state_3 == module_active)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_active = null
|
||||
module_state_3:loc = module
|
||||
store_module(module_state_3)
|
||||
set_module_active(null)
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
|
||||
updateicon()
|
||||
hud_used.update_robot_modules_display()
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
module_active = null
|
||||
set_module_active(null)
|
||||
|
||||
if(module_state_1)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
module_state_1:loc = module
|
||||
store_module(module_state_1)
|
||||
module_state_1 = null
|
||||
inv1.icon_state = "inv1"
|
||||
if(module_state_2)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_state_2:loc = module
|
||||
store_module(module_state_2)
|
||||
module_state_2 = null
|
||||
inv2.icon_state = "inv2"
|
||||
if(module_state_3)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_state_3:loc = module
|
||||
store_module(module_state_3)
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
@@ -148,21 +117,21 @@
|
||||
inv1.icon_state = "inv1 +a"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = module_state_1
|
||||
set_module_active(module_state_1)
|
||||
return
|
||||
if(2)
|
||||
if(module_active != module_state_2)
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2 +a"
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = module_state_2
|
||||
set_module_active(module_state_2)
|
||||
return
|
||||
if(3)
|
||||
if(module_active != module_state_3)
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3 +a"
|
||||
module_active = module_state_3
|
||||
set_module_active(module_state_3)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -174,17 +143,17 @@
|
||||
if(1)
|
||||
if(module_active == module_state_1)
|
||||
inv1.icon_state = "inv1"
|
||||
module_active = null
|
||||
set_module_active(null)
|
||||
return
|
||||
if(2)
|
||||
if(module_active == module_state_2)
|
||||
inv2.icon_state = "inv2"
|
||||
module_active = null
|
||||
set_module_active(null)
|
||||
return
|
||||
if(3)
|
||||
if(module_active == module_state_3)
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = null
|
||||
set_module_active(null)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -233,22 +202,19 @@
|
||||
O.layer = SCREEN_LAYER
|
||||
O.screen_loc = inv1.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
O.on_module_hotbar(src)
|
||||
else if(!module_state_2)
|
||||
module_state_2 = O
|
||||
O.layer = SCREEN_LAYER
|
||||
O.screen_loc = inv2.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
O.on_module_hotbar(src)
|
||||
else if(!module_state_3)
|
||||
module_state_3 = O
|
||||
O.layer = SCREEN_LAYER
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
O.on_module_hotbar(src)
|
||||
else
|
||||
to_chat(src, "<span class='notice'>You need to disable a module first!</span>")
|
||||
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
update_items()
|
||||
if(stat)
|
||||
cut_overlay(eye_overlay)
|
||||
has_cut_eye_overlay = TRUE
|
||||
else if(has_cut_eye_overlay)
|
||||
eye_overlay = cached_eye_overlays[a_intent]
|
||||
add_overlay(eye_overlay)
|
||||
has_cut_eye_overlay = null
|
||||
if(stat != DEAD) //still using power
|
||||
use_power()
|
||||
process_killswitch()
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
// Forces synths to select an icon relevant to their module
|
||||
if(module && !icon_selected)
|
||||
choose_icon()
|
||||
set_intent(a_intent) // to set the eye colour
|
||||
@@ -28,7 +28,7 @@
|
||||
mob_bump_flag = ROBOT
|
||||
mob_swap_flags = ROBOT|MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
mob_push_flags = ~HEAVY //trundle trundle
|
||||
var/speed = 0 //Cause sec borgs gotta go fast //No they dont! // These comments aged like cheese.
|
||||
var/speed = 0
|
||||
|
||||
// Lighting and sight
|
||||
light_wedge = LIGHT_WIDE
|
||||
@@ -69,10 +69,10 @@
|
||||
var/spawn_module // Which module does this robot use when it spawns in?
|
||||
var/selecting_module = 0 //whether the borg is in process of selecting its module or not.
|
||||
var/obj/item/robot_module/module
|
||||
var/module_active
|
||||
var/module_state_1
|
||||
var/module_state_2
|
||||
var/module_state_3
|
||||
var/obj/item/module_active
|
||||
var/obj/item/module_state_1
|
||||
var/obj/item/module_state_2
|
||||
var/obj/item/module_state_3
|
||||
var/cell_type = /obj/item/cell/high
|
||||
var/has_jetpack = FALSE
|
||||
var/has_pda = TRUE
|
||||
@@ -124,6 +124,14 @@
|
||||
/mob/living/silicon/robot/proc/robot_checklaws
|
||||
)
|
||||
|
||||
// Overlays
|
||||
var/has_cut_eye_overlay
|
||||
var/image/eye_overlay
|
||||
var/list/image/cached_eye_overlays
|
||||
var/image/panel_overlay
|
||||
var/list/image/cached_panel_overlays
|
||||
var/image/shield_overlay
|
||||
|
||||
/mob/living/silicon/robot/Initialize(mapload, unfinished = FALSE)
|
||||
spark_system = bind_spark(src, 5)
|
||||
add_language(LANGUAGE_ROBOT, TRUE)
|
||||
@@ -137,7 +145,10 @@
|
||||
module_sprites["Basic"] = "robot"
|
||||
icontype = "Basic"
|
||||
updatename(mod_type)
|
||||
updateicon()
|
||||
|
||||
if(!client)
|
||||
stat = UNCONSCIOUS
|
||||
setup_icon_cache()
|
||||
|
||||
if(mmi?.brainobj)
|
||||
mmi.brainobj.lobotomized = TRUE
|
||||
@@ -292,8 +303,6 @@
|
||||
else
|
||||
icontype = module_sprites[1]
|
||||
icon_state = module_sprites[icontype]
|
||||
|
||||
updateicon()
|
||||
return module_sprites
|
||||
|
||||
/mob/living/silicon/robot/proc/pick_module()
|
||||
@@ -329,6 +338,7 @@
|
||||
notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name)
|
||||
SSrecords.reset_manifest()
|
||||
selecting_module = FALSE
|
||||
setup_icon_cache()
|
||||
|
||||
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
|
||||
if(prefix)
|
||||
@@ -371,6 +381,7 @@
|
||||
|
||||
if(!custom_sprite) //Check for custom sprite
|
||||
set_custom_sprite()
|
||||
setup_icon_cache()
|
||||
|
||||
//Flavour text.
|
||||
if(client)
|
||||
@@ -392,7 +403,7 @@
|
||||
custom_name = newname
|
||||
|
||||
updatename()
|
||||
updateicon()
|
||||
set_module_sprites(module.sprites) // custom synth icons
|
||||
SSrecords.reset_manifest()
|
||||
|
||||
// this verb lets cyborgs see the stations manifest
|
||||
@@ -573,7 +584,7 @@
|
||||
C.electronics_damage = WC.burn
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You install the [W.name] into \the [src]."))
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/gripper)) //Code for allowing cyborgs to use rechargers
|
||||
@@ -588,7 +599,7 @@
|
||||
cell = null
|
||||
cell_component.wrapped = null
|
||||
cell_component.installed = FALSE
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if(cell_component.installed == -1)
|
||||
if(gripper.grip_item(cell_component.wrapped, user))
|
||||
cell_component.wrapped = null
|
||||
@@ -634,7 +645,7 @@
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You close \the [src]'s maintenance hatch."))
|
||||
opened = FALSE
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if(wires_exposed && wires.IsAllCut())
|
||||
//Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob.
|
||||
if(!mmi)
|
||||
@@ -681,7 +692,7 @@
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You open \the [src]'s maintenance hatch."))
|
||||
opened = TRUE
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if (istype(W, /obj/item/stock_parts/matter_bin) && opened) // Installing/swapping a matter bin
|
||||
if(storage)
|
||||
to_chat(user, SPAN_NOTICE("You replace \the [storage] with \the [W]"))
|
||||
@@ -715,7 +726,7 @@
|
||||
//This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z
|
||||
C.brute_damage = 0
|
||||
C.electronics_damage = 0
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if (W.iswirecutter() || W.ismultitool())
|
||||
if(wires_exposed)
|
||||
wires.Interact(user)
|
||||
@@ -725,14 +736,13 @@
|
||||
else if(W.isscrewdriver() && opened && !cell) // haxing
|
||||
wires_exposed = !wires_exposed
|
||||
user.visible_message(SPAN_NOTICE("\The [user] [wires_exposed ? "exposes" : "covers"] \the [src]'s wires."), SPAN_NOTICE("You [wires_exposed ? "expose" : "cover"] \the [src]'s wires."))
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if(W.isscrewdriver() && opened && cell) // radio
|
||||
if(radio)
|
||||
radio.attackby(W, user) //Push it to the radio to let it handle everything
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not have a radio installed!"))
|
||||
return
|
||||
updateicon()
|
||||
else if(istype(W, /obj/item/device/encryptionkey) && opened)
|
||||
if(radio) //sanityyyyyy
|
||||
radio.attackby(W, user) //GTFO, you have your own procs
|
||||
@@ -749,7 +759,7 @@
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
to_chat(user, SPAN_NOTICE("You [ locked ? "lock" : "unlock"] [src]'s interface."))
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("Access denied."))
|
||||
return
|
||||
@@ -796,7 +806,7 @@
|
||||
cell = null
|
||||
cell_component.wrapped = null
|
||||
cell_component.installed = FALSE
|
||||
updateicon()
|
||||
handle_panel_overlay()
|
||||
else if(cell_component.installed == -1)
|
||||
cell_component.installed = FALSE
|
||||
var/obj/item/broken_device = cell_component.wrapped
|
||||
@@ -837,33 +847,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/robot/updateicon()
|
||||
cut_overlays()
|
||||
|
||||
if(stat == CONSCIOUS)
|
||||
if(a_intent == I_HELP)
|
||||
add_overlay(image(icon, "eyes-[module_sprites[icontype]]-help", layer = EFFECTS_ABOVE_LIGHTING_LAYER))
|
||||
else
|
||||
add_overlay(image(icon, "eyes-[module_sprites[icontype]]-harm", layer = EFFECTS_ABOVE_LIGHTING_LAYER))
|
||||
|
||||
if(opened)
|
||||
var/panelprefix = custom_sprite ? src.ckey : "ov"
|
||||
if(wires_exposed)
|
||||
add_overlay("[panelprefix]-openpanel +w")
|
||||
else if(cell)
|
||||
add_overlay("[panelprefix]-openpanel +c")
|
||||
else
|
||||
add_overlay("[panelprefix]-openpanel -c")
|
||||
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
|
||||
add_overlay("[module_sprites[icontype]]-shield")
|
||||
|
||||
if(mod_type == "Combat")
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
|
||||
icon_state = "[module_sprites[icontype]]-roll"
|
||||
else
|
||||
icon_state = module_sprites[icontype]
|
||||
|
||||
/mob/living/silicon/robot/proc/installed_modules()
|
||||
if(weapon_lock)
|
||||
to_chat(src, SPAN_WARNING("Weapon lock active, unable to use modules! Count:[weapon_lock_time]"))
|
||||
@@ -1113,8 +1096,8 @@
|
||||
return
|
||||
|
||||
icon_state = module_sprites[icontype]
|
||||
updateicon()
|
||||
icon_selected = TRUE
|
||||
setup_icon_cache()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 10, TRUE)
|
||||
spark(get_turf(src), 5, alldirs)
|
||||
verbs -= /mob/living/silicon/robot/proc/choose_icon
|
||||
@@ -1246,7 +1229,6 @@
|
||||
if(rebuild)
|
||||
src.module.modules += new /obj/item/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
updateicon()
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You fail to hack into \the [src]."))
|
||||
to_chat(src, SPAN_DANGER("Hack attempt detected and thwarted. Evacuate the area immediately."))
|
||||
|
||||
50
code/modules/mob/living/silicon/robot/robot_helpers.dm
Normal file
50
code/modules/mob/living/silicon/robot/robot_helpers.dm
Normal file
@@ -0,0 +1,50 @@
|
||||
/mob/living/silicon/robot/set_intent(var/set_intent)
|
||||
a_intent = set_intent
|
||||
cut_overlay(eye_overlay)
|
||||
if(!stat)
|
||||
eye_overlay = cached_eye_overlays[a_intent]
|
||||
add_overlay(eye_overlay)
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_panel_overlay()
|
||||
cut_overlay(panel_overlay)
|
||||
if(opened)
|
||||
if(wires_exposed)
|
||||
panel_overlay = cached_panel_overlays[ROBOT_PANEL_EXPOSED]
|
||||
add_overlay(panel_overlay)
|
||||
else if(cell)
|
||||
panel_overlay = cached_panel_overlays[ROBOT_PANEL_CELL]
|
||||
add_overlay(panel_overlay)
|
||||
else
|
||||
panel_overlay = cached_panel_overlays[ROBOT_PANEL_NO_CELL]
|
||||
add_overlay(panel_overlay)
|
||||
|
||||
/mob/living/silicon/robot/proc/setup_icon_cache()
|
||||
cached_eye_overlays = list(
|
||||
I_HELP = image(icon, "eyes-[module_sprites[icontype]]-help", layer = EFFECTS_ABOVE_LIGHTING_LAYER),
|
||||
I_HURT = image(icon, "eyes-[module_sprites[icontype]]-harm", 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)
|
||||
var/panelprefix = custom_sprite ? src.ckey : "ov"
|
||||
cached_panel_overlays = list(
|
||||
ROBOT_PANEL_EXPOSED = image(icon, "[panelprefix]-openpanel +w"),
|
||||
ROBOT_PANEL_CELL = image(icon, "[panelprefix]-openpanel +c"),
|
||||
ROBOT_PANEL_NO_CELL = image(icon, "[panelprefix]-openpanel -c")
|
||||
)
|
||||
|
||||
/mob/living/silicon/robot/proc/set_module_active(var/obj/item/given_module)
|
||||
if(module_active)
|
||||
module_active.on_module_deactivate(src)
|
||||
module_active = given_module
|
||||
if(given_module)
|
||||
given_module.on_module_activate(src)
|
||||
|
||||
/mob/living/silicon/robot/proc/store_module(var/obj/item/stored_module)
|
||||
stored_module.on_module_store(src)
|
||||
stored_module.loc = module
|
||||
if(client)
|
||||
client.screen -= stored_module
|
||||
contents -= stored_module
|
||||
@@ -225,6 +225,18 @@
|
||||
T.visible_message(SPAN_NOTICE("\The [src.loc] dispenses a sheet of crisp white paper."))
|
||||
new /obj/item/paper(T)
|
||||
|
||||
/obj/item/proc/on_module_hotbar(var/mob/living/silicon/robot/R)
|
||||
return
|
||||
|
||||
/obj/item/proc/on_module_store(var/mob/living/silicon/robot/R)
|
||||
return
|
||||
|
||||
/obj/item/proc/on_module_activate(var/mob/living/silicon/robot/R)
|
||||
return
|
||||
|
||||
/obj/item/proc/on_module_deactivate(var/mob/living/silicon/robot/R)
|
||||
return
|
||||
|
||||
//Personal shielding for the combat module.
|
||||
/obj/item/borg/combat/shield
|
||||
name = "personal shielding"
|
||||
@@ -232,6 +244,14 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "shield1" //placeholder for now // four fucking years alberyk. FOUR
|
||||
var/shield_level = 0.5 //Percentage of damage absorbed by the shield.
|
||||
var/image/shield_overlay
|
||||
|
||||
/obj/item/borg/combat/shield/on_module_activate(mob/living/silicon/robot/R)
|
||||
shield_overlay = image(R.icon, "[R.module_sprites[R.icontype]]-shield")
|
||||
R.add_overlay(shield_overlay)
|
||||
|
||||
/obj/item/borg/combat/shield/on_module_deactivate(mob/living/silicon/robot/R)
|
||||
R.cut_overlay(shield_overlay)
|
||||
|
||||
/obj/item/borg/combat/shield/verb/set_shield_level()
|
||||
set name = "Set shield level"
|
||||
@@ -248,6 +268,14 @@
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
|
||||
/obj/item/borg/combat/mobility/on_module_activate(mob/living/silicon/robot/R)
|
||||
R.icon_state = "[R.module_sprites[R.icontype]]-roll"
|
||||
R.speed = -2
|
||||
|
||||
/obj/item/borg/combat/mobility/on_module_deactivate(mob/living/silicon/robot/R)
|
||||
R.icon_state = R.module_sprites[R.icontype]
|
||||
R.speed = initial(R.speed)
|
||||
|
||||
/obj/item/inflatable_dispenser
|
||||
name = "inflatables dispenser"
|
||||
desc = "Small device which allows rapid deployment and removal of inflatables."
|
||||
@@ -476,4 +504,4 @@
|
||||
|
||||
/obj/item/inductive_charger/proc/recharge()
|
||||
ready_to_use = TRUE
|
||||
maptext = "<span style=\"font-family: 'Small Fonts'; -dm-text-outline: 1 black; font-size: 7px;\">Ready</span>"
|
||||
maptext = "<span style=\"font-family: 'Small Fonts'; -dm-text-outline: 1 black; font-size: 7px;\">Ready</span>"
|
||||
|
||||
@@ -68,6 +68,7 @@ var/global/list/robot_modules = list(
|
||||
R.set_module_sprites(sprites)
|
||||
R.icon_selected = FALSE
|
||||
R.choose_icon()
|
||||
R.setup_icon_cache()
|
||||
|
||||
/obj/item/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
|
||||
remove_camera_networks(R)
|
||||
@@ -80,6 +81,7 @@ var/global/list/robot_modules = list(
|
||||
R.set_module_sprites(list("Default" = "robot"))
|
||||
R.icon_selected = FALSE
|
||||
R.choose_icon()
|
||||
R.setup_icon_cache()
|
||||
|
||||
/obj/item/robot_module/Destroy()
|
||||
for(var/module in modules)
|
||||
|
||||
@@ -28,4 +28,7 @@
|
||||
if(client)
|
||||
var/turf/B = GetAbove(get_turf(src))
|
||||
if(up_hint)
|
||||
up_hint.icon_state = "uphint[(B ? !!B.is_hole : 0)]"
|
||||
up_hint.icon_state = "uphint[(B ? !!B.is_hole : 0)]"
|
||||
|
||||
/mob/living/silicon/robot/movement_delay()
|
||||
return speed
|
||||
@@ -33,33 +33,7 @@
|
||||
var/datum/robot_component/C = components["surge"]
|
||||
C.installed = TRUE
|
||||
C.wrapped = new C.external_type
|
||||
|
||||
/mob/living/silicon/robot/syndicate/updateicon() //because this was the only way I found out how to make their eyes and etc works
|
||||
cut_overlays()
|
||||
|
||||
if(stat == CONSCIOUS)
|
||||
if(a_intent == I_HELP)
|
||||
add_overlay(image(icon, "eyes-[module_sprites[icontype]]-help", layer = EFFECTS_ABOVE_LIGHTING_LAYER))
|
||||
else
|
||||
add_overlay(image(icon, "eyes-[module_sprites[icontype]]-harm", layer = EFFECTS_ABOVE_LIGHTING_LAYER))
|
||||
|
||||
if(opened)
|
||||
var/panelprefix = custom_sprite ? src.ckey : "ov"
|
||||
if(wires_exposed)
|
||||
add_overlay("[panelprefix]-openpanel +w")
|
||||
else if(cell)
|
||||
add_overlay("[panelprefix]-openpanel +c")
|
||||
else
|
||||
add_overlay("[panelprefix]-openpanel -c")
|
||||
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
|
||||
add_overlay("[icon_state]-shield")
|
||||
|
||||
if(mod_type == "Combat")
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
|
||||
icon_state = "[icon_state]-roll"
|
||||
else
|
||||
icon_state = module_sprites[icontype]
|
||||
setup_icon_cache()
|
||||
|
||||
/mob/living/silicon/robot/syndicate/death()
|
||||
..()
|
||||
|
||||
@@ -451,22 +451,22 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
|
||||
if(ishuman(src) || isbrain(src) || isslime(src))
|
||||
switch(input)
|
||||
if(I_HELP,I_DISARM,I_GRAB,I_HURT)
|
||||
a_intent = input
|
||||
set_intent(input)
|
||||
if("right")
|
||||
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
|
||||
set_intent(intent_numeric((intent_numeric(a_intent)+1) % 4))
|
||||
if("left")
|
||||
a_intent = intent_numeric((intent_numeric(a_intent)+3) % 4)
|
||||
set_intent(intent_numeric((intent_numeric(a_intent)+3) % 4))
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "intent_[a_intent]"
|
||||
|
||||
else if(isrobot(src))
|
||||
switch(input)
|
||||
if(I_HELP)
|
||||
a_intent = I_HELP
|
||||
set_intent(I_HELP)
|
||||
if(I_HURT)
|
||||
a_intent = I_HURT
|
||||
set_intent(I_HURT)
|
||||
if("right","left")
|
||||
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
|
||||
set_intent(intent_numeric(intent_numeric(a_intent) - 3))
|
||||
if(hud_used && hud_used.action_intent)
|
||||
if(a_intent == I_HURT)
|
||||
hud_used.action_intent.icon_state = I_HURT
|
||||
@@ -1221,4 +1221,7 @@ proc/is_blind(A)
|
||||
update_canmove()
|
||||
W.set_dir(dir)
|
||||
W.buckled_mob = src
|
||||
W.add_fingerprint(src)
|
||||
W.add_fingerprint(src)
|
||||
|
||||
/mob/proc/set_intent(var/set_intent)
|
||||
a_intent = set_intent
|
||||
@@ -249,7 +249,7 @@
|
||||
qdel(t)
|
||||
|
||||
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
|
||||
new_corgi.a_intent = I_HURT
|
||||
new_corgi.set_intent(I_HURT)
|
||||
new_corgi.key = key
|
||||
|
||||
to_chat(new_corgi, "<B>You are now a Corgi. Yap Yap!</B>")
|
||||
@@ -282,7 +282,7 @@
|
||||
var/mob/new_mob = new mobpath(src.loc)
|
||||
|
||||
new_mob.key = key
|
||||
new_mob.a_intent = I_HURT
|
||||
new_mob.set_intent(I_HURT)
|
||||
|
||||
|
||||
to_chat(new_mob, "You suddenly feel more... animalistic.")
|
||||
@@ -302,7 +302,7 @@
|
||||
var/mob/new_mob = new mobpath(src.loc)
|
||||
|
||||
new_mob.key = key
|
||||
new_mob.a_intent = I_HURT
|
||||
new_mob.set_intent(I_HURT)
|
||||
to_chat(new_mob, "You feel more... animalistic")
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -8,7 +8,6 @@ mob/var/last_typed_time
|
||||
mob/var/obj/effect/decal/typing_indicator
|
||||
|
||||
/mob/proc/set_typing_indicator(var/state)
|
||||
|
||||
if(!typing_indicator)
|
||||
typing_indicator = new
|
||||
typing_indicator.icon = 'icons/mob/talk.dmi'
|
||||
@@ -62,26 +61,6 @@ mob/var/obj/effect/decal/typing_indicator
|
||||
if(message)
|
||||
me_verb(message)
|
||||
|
||||
/mob/proc/handle_typing_indicator()
|
||||
if(client)
|
||||
if(!(client.prefs.toggles & SHOW_TYPING) && !hud_typing)
|
||||
var/temp = winget(client, "input", "text")
|
||||
|
||||
if (temp != last_typed)
|
||||
last_typed = temp
|
||||
last_typed_time = world.time
|
||||
|
||||
if (world.time > last_typed_time + TYPING_INDICATOR_LIFETIME)
|
||||
set_typing_indicator(0)
|
||||
return
|
||||
if(length(temp) > 5 && findtext(temp, "Say \"", 1, 7))
|
||||
set_typing_indicator(1)
|
||||
else if(length(temp) > 3 && findtext(temp, "Me ", 1, 5))
|
||||
set_typing_indicator(1)
|
||||
|
||||
else
|
||||
set_typing_indicator(0)
|
||||
|
||||
/client/verb/typing_indicator()
|
||||
set name = "Show/Hide Typing Indicator"
|
||||
set category = "Preferences"
|
||||
@@ -94,4 +73,4 @@ mob/var/obj/effect/decal/typing_indicator
|
||||
if(prefs.toggles & SHOW_TYPING)
|
||||
if(istype(mob)) mob.set_typing_indicator(0)
|
||||
|
||||
feedback_add_details("admin_verb","TID") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
feedback_add_details("admin_verb","TID") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -52,7 +52,7 @@ obj/item/gun/energy/staff/special_check(var/mob/living/user)
|
||||
new_mob = new /mob/living/simple_animal/parrot(H.loc)
|
||||
new_mob.universal_speak = 1
|
||||
new_mob.key = H.key
|
||||
new_mob.a_intent = "harm"
|
||||
new_mob.set_intent(I_HURT)
|
||||
qdel(H)
|
||||
sleep(20)
|
||||
new_mob.say("Poly wanna cracker!")
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
for (var/spell/S in M.spell_list)
|
||||
new_mob.add_spell(new S.type)
|
||||
|
||||
new_mob.a_intent = "hurt"
|
||||
new_mob.set_intent(I_HURT)
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
else
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
W.forceMove(M.loc)
|
||||
W.dropped(M)
|
||||
var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
new_mob.a_intent = "hurt"
|
||||
new_mob.set_intent(I_HURT)
|
||||
new_mob.universal_speak = 1
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
|
||||
Reference in New Issue
Block a user