Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -4,23 +4,25 @@
|
||||
icon_screen = "cameras"
|
||||
icon_keyboard = "security_key"
|
||||
var/mob/camera/aiEye/remote/eyeobj
|
||||
var/mob/living/carbon/human/current_user = null
|
||||
var/mob/living/current_user = null
|
||||
var/list/networks = list("SS13")
|
||||
var/datum/action/innate/camera_off/off_action = new
|
||||
var/datum/action/innate/camera_jump/jump_action = new
|
||||
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/CreateEye()
|
||||
eyeobj = new()
|
||||
eyeobj.origin = src
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/GrantActions(mob/living/carbon/user)
|
||||
/obj/machinery/computer/camera_advanced/proc/GrantActions(mob/living/user)
|
||||
off_action.target = user
|
||||
off_action.Grant(user)
|
||||
jump_action.target = user
|
||||
jump_action.Grant(user)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || !Adjacent(user) || user.eye_blind || user.incapacitated() )
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
user.unset_machine()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/Destroy()
|
||||
@@ -36,13 +38,11 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/attack_hand(mob/user)
|
||||
if(current_user)
|
||||
user << "The console is already in use!"
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
to_chat(user, "The console is already in use!")
|
||||
return
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/carbon/L = user
|
||||
var/mob/living/L = user
|
||||
|
||||
if(!eyeobj)
|
||||
CreateEye()
|
||||
@@ -65,6 +65,11 @@
|
||||
give_eye_control(L)
|
||||
eyeobj.setLoc(eyeobj.loc)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/attack_robot(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
obj/machinery/computer/camera_advanced/attack_ai(mob/user)
|
||||
return //AIs would need to disable their own camera procs to use the console safely. Bugs happen otherwise.
|
||||
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user)
|
||||
@@ -80,7 +85,7 @@
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
var/mob/living/carbon/human/eye_user = null
|
||||
var/mob/living/eye_user = null
|
||||
var/obj/machinery/computer/camera_advanced/origin
|
||||
var/eye_initialized = 0
|
||||
var/visible_icon = 0
|
||||
@@ -132,9 +137,9 @@
|
||||
button_icon_state = "camera_off"
|
||||
|
||||
/datum/action/innate/camera_off/Activate()
|
||||
if(!target || !iscarbon(target))
|
||||
if(!target || !isliving(target))
|
||||
return
|
||||
var/mob/living/carbon/C = target
|
||||
var/mob/living/C = target
|
||||
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
|
||||
remote_eye.origin.current_user = null
|
||||
remote_eye.origin.jump_action.Remove(C)
|
||||
@@ -155,9 +160,9 @@
|
||||
button_icon_state = "camera_jump"
|
||||
|
||||
/datum/action/innate/camera_jump/Activate()
|
||||
if(!target || !iscarbon(target))
|
||||
if(!target || !isliving(target))
|
||||
return
|
||||
var/mob/living/carbon/C = target
|
||||
var/mob/living/C = target
|
||||
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/origin = remote_eye.origin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user