mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +01:00
Restricts AI shells module- and z-level- wise
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
robot_module_types += "Pupdozer"
|
||||
return 1
|
||||
|
||||
var/list/shell_module_types = list(
|
||||
"Standard", "Service", "Clerical"
|
||||
)
|
||||
|
||||
var/global/list/acceptable_fruit_types= list(
|
||||
"ambrosia",
|
||||
"apple",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
for(var/borgie in GLOB.available_ai_shells)
|
||||
var/mob/living/silicon/robot/R = borgie
|
||||
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) )
|
||||
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) && !(using_map.ai_shell_restricted && !(R.z in using_map.ai_shell_allowed_levels)) ) //VOREStation Edit: shell restrictions
|
||||
possible += R
|
||||
|
||||
if(!LAZYLEN(possible))
|
||||
|
||||
@@ -259,11 +259,16 @@
|
||||
if(module)
|
||||
return
|
||||
var/list/modules = list()
|
||||
modules.Add(robot_module_types)
|
||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override) // VOREStation Edit
|
||||
to_chat(src, "<font color='red'>Crisis mode active. Combat module available.</font>")
|
||||
modules+="Combat"
|
||||
modules+="ERT" //VOREStation Edit
|
||||
//VOREStatation Edit Start: shell restrictions
|
||||
if(shell)
|
||||
modules.Add(shell_module_types)
|
||||
else
|
||||
modules.Add(robot_module_types)
|
||||
if(crisis || security_level == SEC_LEVEL_RED || crisis_override)
|
||||
to_chat(src, "<font color='red'>Crisis mode active. Combat module available.</font>")
|
||||
modules+="Combat"
|
||||
modules+="ERT"
|
||||
//VOREStatation Edit End: shell restrictions
|
||||
modtype = input("Please, select a module!", "Robot module", null, null) as null|anything in modules
|
||||
|
||||
if(module)
|
||||
|
||||
@@ -258,3 +258,10 @@
|
||||
return
|
||||
if(buckle_mob(M))
|
||||
visible_message("<span class='notice'>[M] starts riding [name]!</span>")
|
||||
|
||||
/mob/living/silicon/robot/onTransitZ(old_z, new_z)
|
||||
if(shell)
|
||||
if(deployed && using_map.ai_shell_restricted && !(new_z in using_map.ai_shell_allowed_levels))
|
||||
to_chat(src,"<span class='warning'>Your connection with the shell is suddenly interrupted!</span>")
|
||||
undeploy()
|
||||
..()
|
||||
|
||||
@@ -150,6 +150,23 @@
|
||||
list("Debris Field - Z1 Space")
|
||||
)
|
||||
|
||||
ai_shell_restricted = TRUE
|
||||
ai_shell_allowed_levels = list(
|
||||
Z_LEVEL_SURFACE_LOW,
|
||||
Z_LEVEL_SURFACE_MID,
|
||||
Z_LEVEL_SURFACE_HIGH,
|
||||
Z_LEVEL_TRANSIT,
|
||||
Z_LEVEL_SPACE_LOW,
|
||||
Z_LEVEL_SPACE_MID,
|
||||
Z_LEVEL_SPACE_HIGH,
|
||||
Z_LEVEL_SURFACE_MINE,
|
||||
Z_LEVEL_SOLARS,
|
||||
Z_LEVEL_CENTCOM,
|
||||
Z_LEVEL_MISC,
|
||||
Z_LEVEL_SHIPS,
|
||||
Z_LEVEL_BEACH
|
||||
)
|
||||
|
||||
lateload_single_pick = null //Nothing right now.
|
||||
|
||||
/datum/map/tether/perform_map_generation()
|
||||
|
||||
@@ -59,6 +59,8 @@ var/list/all_maps = list()
|
||||
var/list/holomap_legend_x = list()
|
||||
var/list/holomap_legend_y = list()
|
||||
var/list/meteor_strike_areas // VOREStation Edit - Areas meteor strikes may choose to hit.
|
||||
var/ai_shell_restricted = FALSE //VOREStation Addition - are there z-levels restricted?
|
||||
var/ai_shell_allowed_levels = list() //VOREStation Addition - which z-levels ARE we allowed to visit?
|
||||
|
||||
var/station_name = "BAD Station"
|
||||
var/station_short = "Baddy"
|
||||
|
||||
Reference in New Issue
Block a user