mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
@@ -51,7 +51,7 @@ var/list/ai_verbs_default = list(
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/aiRestorePowerRoutine = 0
|
||||
var/viewalerts = 0
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/icon/holo_icon //Default is assigned when AI is created.
|
||||
var/list/connected_robots = list()
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
var/obj/item/device/communicator/aiCommunicator = null
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
"Teppi" = "teppi",
|
||||
"Catslug" = "catslug",
|
||||
"Car" = "car",
|
||||
"Type One" = "typeone"
|
||||
"Type One" = "typeone",
|
||||
"Type Thirteen" = "13"
|
||||
//VOREStation Addition End
|
||||
)
|
||||
|
||||
@@ -104,6 +105,8 @@
|
||||
|
||||
var/current_pda_messaging = null
|
||||
|
||||
var/our_icon_rotation = 0
|
||||
|
||||
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
||||
src.loc = paicard
|
||||
card = paicard
|
||||
@@ -246,6 +249,7 @@
|
||||
return
|
||||
|
||||
if(world.time <= last_special)
|
||||
to_chat(src, "<span class ='warning'>You can't unfold yet.</span>")
|
||||
return
|
||||
|
||||
last_special = world.time + 100
|
||||
@@ -299,6 +303,7 @@
|
||||
return
|
||||
|
||||
if(world.time <= last_special)
|
||||
to_chat(src, "<span class ='warning'>You can't fold up yet.</span>")
|
||||
return
|
||||
|
||||
close_up()
|
||||
@@ -345,14 +350,49 @@
|
||||
var/obj/item/weapon/rig/rig = src.get_rig()
|
||||
if(istype(rig))
|
||||
rig.force_rest(src)
|
||||
return
|
||||
else if(chassis == "13")
|
||||
resting = !resting
|
||||
update_transform()
|
||||
else
|
||||
resting = !resting
|
||||
icon_state = resting ? "[chassis]_rest" : "[chassis]"
|
||||
update_icon() //VOREStation edit
|
||||
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>")
|
||||
to_chat(src, "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>")
|
||||
|
||||
canmove = !resting
|
||||
|
||||
/mob/living/silicon/pai/update_transform()
|
||||
. = ..()
|
||||
if(chassis != "13")
|
||||
return
|
||||
to_chat(src, "I'm gonna try to rotate the icon!")
|
||||
var/desired_scale_x = size_multiplier * icon_scale_x
|
||||
var/desired_scale_y = size_multiplier * icon_scale_y
|
||||
appearance_flags |= PIXEL_SCALE
|
||||
|
||||
var/matrix/M = matrix()
|
||||
var/anim_time = 3
|
||||
|
||||
if(resting)
|
||||
var/randn = rand(1, 2)
|
||||
if(randn <= 1) // randomly choose a rotation
|
||||
M.Turn(-90)
|
||||
else
|
||||
M.Turn(90)
|
||||
M.Scale(desired_scale_y, desired_scale_x)//VOREStation Edit
|
||||
if(holo_icon_dimension == 64)//VOREStation Edit
|
||||
M.Translate(13,-22)
|
||||
else
|
||||
M.Translate(1,-6)
|
||||
layer = MOB_LAYER -0.01 // Fix for a byond bug where turf entry order no longer matters
|
||||
else
|
||||
M.Scale(desired_scale_x, desired_scale_y)//VOREStation Edit
|
||||
M.Translate(0, (vis_height/2)*(desired_scale_y-1)) //VOREStation edit
|
||||
layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
||||
animate(src, transform = M, time = anim_time)
|
||||
|
||||
|
||||
//Overriding this will stop a number of headaches down the track.
|
||||
/mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.force)
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
var/hide_glow = FALSE
|
||||
var/image/eye_layer = null // Holds the eye overlay.
|
||||
var/eye_color = "#00ff0d"
|
||||
var/icon/holo_icon
|
||||
var/icon/holo_icon_north
|
||||
var/holo_icon_dimension = 32
|
||||
var/global/list/wide_chassis = list(
|
||||
"rat",
|
||||
"panther",
|
||||
@@ -41,7 +44,8 @@
|
||||
"teppi",
|
||||
"catslug",
|
||||
"car",
|
||||
"typeone"
|
||||
"typeone",
|
||||
"13"
|
||||
)
|
||||
//These vars keep track of whether you have the related software, used for easily updating the UI
|
||||
var/soft_ut = FALSE //universal translator
|
||||
@@ -60,6 +64,11 @@
|
||||
verbs |= /mob/living/proc/set_size
|
||||
verbs |= /mob/living/proc/shred_limb
|
||||
|
||||
/mob/living/silicon/pai/Login()
|
||||
. = ..()
|
||||
last_special = world.time + 100 //Let's give get_character_icon time to work
|
||||
get_character_icon()
|
||||
|
||||
/mob/living/silicon/pai/proc/pai_nom(var/mob/living/T in oview(1))
|
||||
set name = "pAI Nom"
|
||||
set category = "pAI Commands"
|
||||
@@ -78,6 +87,10 @@
|
||||
|
||||
/mob/living/silicon/pai/update_icon() //Some functions cause this to occur, such as resting
|
||||
..()
|
||||
if(chassis == "13")
|
||||
add_eyes()
|
||||
return
|
||||
|
||||
update_fullness_pai()
|
||||
|
||||
if(!people_eaten && !resting)
|
||||
@@ -106,6 +119,9 @@
|
||||
|
||||
/mob/living/silicon/pai/update_icons() //And other functions cause this to occur, such as digesting someone.
|
||||
..()
|
||||
if(chassis == "13")
|
||||
add_eyes()
|
||||
return
|
||||
update_fullness_pai()
|
||||
if(!people_eaten && !resting)
|
||||
icon_state = "[chassis]"
|
||||
@@ -134,7 +150,13 @@
|
||||
var/oursize = size_multiplier
|
||||
resize(1, FALSE, TRUE, TRUE, FALSE) //We resize ourselves to normal here for a moment to let the vis_height get reset
|
||||
chassis = possible_chassis[choice]
|
||||
if(chassis in wide_chassis)
|
||||
if(chassis == "13")
|
||||
if(!holo_icon)
|
||||
if(!get_character_icon())
|
||||
return
|
||||
icon_state = null
|
||||
icon = holo_icon
|
||||
else if(chassis in wide_chassis)
|
||||
icon = 'icons/mob/pai_vr64x64.dmi'
|
||||
vis_height = 64
|
||||
else
|
||||
@@ -154,6 +176,7 @@
|
||||
/mob/living/silicon/pai/verb/toggle_eyeglow()
|
||||
set category = "pAI Commands"
|
||||
set name = "Toggle Eye Glow"
|
||||
|
||||
if(chassis in allows_eye_color)
|
||||
if(eye_glow && !hide_glow)
|
||||
eye_glow = FALSE
|
||||
@@ -186,14 +209,22 @@
|
||||
|
||||
/mob/living/silicon/pai/proc/add_eyes()
|
||||
remove_eyes()
|
||||
if(chassis in allows_eye_color)
|
||||
if(!eye_layer)
|
||||
eye_layer = image(icon, "[icon_state]-eyes")
|
||||
eye_layer.appearance_flags = appearance_flags
|
||||
eye_layer.color = eye_color
|
||||
if(eye_glow && !hide_glow)
|
||||
eye_layer.plane = PLANE_LIGHTING_ABOVE
|
||||
add_overlay(eye_layer)
|
||||
if(chassis == "13")
|
||||
if(holo_icon.Width() > 32)
|
||||
eye_layer = image('icons/mob/pai_vr64x64.dmi', "type13-eyes")
|
||||
pixel_x = -16
|
||||
default_pixel_x = -16
|
||||
holo_icon_dimension = 64
|
||||
else
|
||||
eye_layer = image('icons/mob/pai_vr.dmi', "type13-eyes")
|
||||
else if(chassis in allows_eye_color)
|
||||
eye_layer = image(icon, "[icon_state]-eyes")
|
||||
else return
|
||||
eye_layer.appearance_flags = appearance_flags
|
||||
eye_layer.color = eye_color
|
||||
if(eye_glow && !hide_glow)
|
||||
eye_layer.plane = PLANE_LIGHTING_ABOVE
|
||||
add_overlay(eye_layer)
|
||||
|
||||
/mob/living/silicon/pai/proc/remove_eyes()
|
||||
cut_overlay(eye_layer)
|
||||
@@ -545,3 +576,33 @@
|
||||
|
||||
/mob/living/silicon/pai/proc/ar_hud()
|
||||
touch_window("AR HUD")
|
||||
|
||||
/mob/living/silicon/pai/proc/get_character_icon()
|
||||
if(!client || !client.prefs) return FALSE
|
||||
var/mob/living/carbon/human/dummy/dummy = new ()
|
||||
//This doesn't include custom_items because that's ... hard.
|
||||
client.prefs.dress_preview_mob(dummy)
|
||||
sleep(1 SECOND) //Strange bug in preview code? Without this, certain things won't show up. Yay race conditions?
|
||||
dummy.regenerate_icons()
|
||||
|
||||
var/icon/new_holo = getCompoundIcon(dummy)
|
||||
|
||||
dummy.tail_alt = TRUE
|
||||
dummy.set_dir(NORTH)
|
||||
var/icon/new_holo_north = getCompoundIcon(dummy)
|
||||
|
||||
qdel(holo_icon)
|
||||
qdel(holo_icon_north)
|
||||
qdel(dummy)
|
||||
holo_icon = new_holo
|
||||
holo_icon_north = new_holo_north
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/pai/set_dir(var/new_dir)
|
||||
. = ..()
|
||||
if(. && (chassis == "13"))
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
icon = holo_icon
|
||||
else
|
||||
icon = holo_icon_north
|
||||
@@ -205,6 +205,8 @@
|
||||
// Determine what job is marked as 'High' priority, and dress them up as such.
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
previewJob = job_master.GetJob(USELESS_JOB)
|
||||
else if(ispAI(client.mob)) //VOREStation Edit! - pAIs shouldn't wear job gear~!
|
||||
//Don't do anything!
|
||||
else
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
var/job_flag
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
Reference in New Issue
Block a user