mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
pAI Flashlights (#8837)
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
*****************/
|
||||
/mob/living/silicon/proc/computer_interact()
|
||||
set name = "Open Computer Interface"
|
||||
set category = "Subystems"
|
||||
set category = "Subsystems"
|
||||
|
||||
computer.attack_self(src)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
********************/
|
||||
/mob/living/silicon/proc/subsystem_alarm_monitor()
|
||||
set name = "Alarm Monitor"
|
||||
set category = "Subystems"
|
||||
set category = "Subsystems"
|
||||
|
||||
alarm_monitor.ui_interact(usr, state = self_state)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
****************/
|
||||
/mob/living/silicon/proc/subsystem_law_manager()
|
||||
set name = "Law Manager"
|
||||
set category = "Subystems"
|
||||
set category = "Subsystems"
|
||||
|
||||
law_manager.ui_interact(usr, state = conscious_state)
|
||||
|
||||
@@ -75,6 +75,6 @@
|
||||
********************/
|
||||
/mob/living/silicon/ai/proc/subsystem_ntnet_monitor()
|
||||
set name = "NTNet Monitoring"
|
||||
set category = "Subystems"
|
||||
set category = "Subsystems"
|
||||
|
||||
ntnet_monitor.ui_interact(usr, state = conscious_state)
|
||||
@@ -104,22 +104,27 @@
|
||||
var/response_harm = "kicks"
|
||||
var/harm_intent_damage = 15//based on 100 health, which is probably too much for a pai to have
|
||||
|
||||
var/flashlight_active = FALSE
|
||||
light_power = 0
|
||||
light_range = 4
|
||||
light_color = COLOR_BRIGHT_GREEN
|
||||
light_wedge = 45
|
||||
|
||||
/mob/living/silicon/pai/movement_delay()
|
||||
return 0.8
|
||||
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/M as mob)
|
||||
/mob/living/silicon/pai/attack_hand(mob/living/carbon/human/M)
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if(I_HELP)
|
||||
M.visible_message(span("notice","[M] [response_help] \the [src]"))
|
||||
toggle_flashlight()
|
||||
|
||||
if(I_DISARM)
|
||||
M.visible_message(span("notice","[M] [response_disarm] \the [src]"))
|
||||
M.do_attack_animation(src)
|
||||
//TODO: Push the mob away or something
|
||||
|
||||
close_up()
|
||||
|
||||
if(I_HURT)
|
||||
apply_damage(harm_intent_damage, BRUTE, used_weapon = "Attack by [M.name]")
|
||||
@@ -127,12 +132,19 @@
|
||||
M.do_attack_animation(src)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/pai/proc/toggle_flashlight()
|
||||
flashlight_active = !flashlight_active
|
||||
if(flashlight_active)
|
||||
set_light(4, 1, COLOR_BRIGHT_GREEN, angle = 45)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/mob/living/silicon/pai/Initialize(mapload)
|
||||
var/obj/item/device/paicard/paicard = loc
|
||||
if (!istype(paicard))
|
||||
//If we get here, then we must have been created by adminspawning.
|
||||
//so lets assist with debugging by creating our own card and adding ourself to it
|
||||
paicard = new/obj/item/device/paicard(loc)
|
||||
paicard = new /obj/item/device/paicard(loc)
|
||||
paicard.pai = src
|
||||
|
||||
canmove = 0
|
||||
|
||||
@@ -25,4 +25,5 @@
|
||||
/obj/item/modular_computer/silicon/pai/install_default_programs()
|
||||
. = ..()
|
||||
hard_drive.store_file(new /datum/computer_file/program/pai_directives())
|
||||
hard_drive.store_file(new /datum/computer_file/program/pai_radio())
|
||||
hard_drive.store_file(new /datum/computer_file/program/pai_radio())
|
||||
hard_drive.store_file(new /datum/computer_file/program/pai_flashlight())
|
||||
@@ -0,0 +1,34 @@
|
||||
/datum/computer_file/program/pai_flashlight
|
||||
filename = "flashlight"
|
||||
filedesc = "pAI Flashlight"
|
||||
extended_desc = "This service toggles the integrated flashlight systems."
|
||||
size = 0
|
||||
program_type = PROGRAM_SERVICE
|
||||
available_on_ntnet = TRUE
|
||||
usage_flags = PROGRAM_SILICON_PAI
|
||||
|
||||
/datum/computer_file/program/pai_flashlight/service_activate()
|
||||
. = ..()
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
host.toggle_flashlight()
|
||||
|
||||
/datum/computer_file/program/pai_flashlight/service_deactivate()
|
||||
. = ..()
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
host.toggle_flashlight()
|
||||
Reference in New Issue
Block a user