mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Adds preliminary robot module sight actions
No icons yet, that's another commit
This commit is contained in:
@@ -86,6 +86,7 @@ var/list/robot_verbs_default = list(
|
||||
var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect.
|
||||
|
||||
var/datum/action/item_action/toggle_research_scanner/scanner = null
|
||||
var/list/module_actions = list()
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0)
|
||||
spark_system = new /datum/effect/system/spark_spread()
|
||||
@@ -371,7 +372,7 @@ var/list/robot_verbs_default = list(
|
||||
//languages
|
||||
module.add_languages(src)
|
||||
//subsystems
|
||||
module.add_subsystems(src)
|
||||
module.add_subsystems_and_actions(src)
|
||||
|
||||
//Custom_sprite check and entry
|
||||
if(custom_sprite == 1)
|
||||
@@ -1424,7 +1425,7 @@ var/list/robot_verbs_default = list(
|
||||
//languages
|
||||
module.add_languages(src)
|
||||
//subsystems
|
||||
module.add_subsystems(src)
|
||||
module.add_subsystems_and_actions(src)
|
||||
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
@@ -1443,7 +1444,7 @@ var/list/robot_verbs_default = list(
|
||||
//languages
|
||||
module.add_languages(src)
|
||||
//subsystems
|
||||
module.add_subsystems(src)
|
||||
module.add_subsystems_and_actions(src)
|
||||
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/datum/action/innate/robot_sight
|
||||
var/sight_mode = null
|
||||
|
||||
/datum/action/innate/robot_sight/Activate()
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
R.sight_mode |= sight_mode
|
||||
R.update_sight()
|
||||
active = 1
|
||||
|
||||
/datum/action/innate/robot_sight/Deactivate()
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
R.sight_mode &= ~sight_mode
|
||||
R.update_sight()
|
||||
active = 0
|
||||
|
||||
/datum/action/innate/robot_sight/xray
|
||||
name = "X-ray Vision"
|
||||
sight_mode = BORGXRAY
|
||||
|
||||
/datum/action/innate/sight/thermal
|
||||
name = "Thermal Vision"
|
||||
sight_mode = BORGTHERM
|
||||
|
||||
/datum/action/innate/robot_sight/meson
|
||||
name = "Meson Vision"
|
||||
sight_mode = BORGMESON
|
||||
@@ -9,6 +9,7 @@
|
||||
var/list/modules = list()
|
||||
var/obj/item/emag = null
|
||||
var/list/subsystems = list()
|
||||
var/list/module_actions = list()
|
||||
|
||||
var/module_type = "NoMod" // For icon usage
|
||||
|
||||
@@ -92,11 +93,18 @@
|
||||
R.add_language("Orluum", 0)
|
||||
R.add_language("Clownish",0)
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_subsystems(mob/living/silicon/robot/R)
|
||||
/obj/item/weapon/robot_module/proc/add_subsystems_and_actions(mob/living/silicon/robot/R)
|
||||
R.verbs |= subsystems
|
||||
for(var/A in module_actions)
|
||||
var/datum/action/act = new A()
|
||||
A.grant(R)
|
||||
R.module_actions += A
|
||||
|
||||
/obj/item/weapon/robot_module/proc/remove_subsystems(mob/living/silicon/robot/R)
|
||||
/obj/item/weapon/robot_module/proc/remove_subsystems_and_actions(mob/living/silicon/robot/R)
|
||||
R.verbs -= subsystems
|
||||
for(var/datum/action/A in R.module_actions)
|
||||
A.Remove(R)
|
||||
R.module_actions.cut()
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
|
||||
Reference in New Issue
Block a user