mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Changes to drones and z-macros (#7068)
Turns the z-level restriction procs into macros Changes z-level restrictions to use the macros Use contact_levels for announcements (instead of player_levels) Restricts the teleporter to station_levels instead of player_levels Restricts AI tracking to station_levels instead of player_levels Mechs only get tracking beacons if they are on station_levels (instead of player_levels) Construction Drones gib if they enter a station level Mining Drones gib if they leave the station levels Removes the mining equipment vendor from the scrapheap
This commit is contained in:
@@ -60,7 +60,6 @@
|
||||
var/obj/item/hat
|
||||
var/hat_x_offset = 0
|
||||
var/hat_y_offset = -13
|
||||
var/range_limit = 1
|
||||
var/hacked = FALSE
|
||||
|
||||
holder_type = /obj/item/weapon/holder/drone
|
||||
@@ -107,7 +106,6 @@
|
||||
can_pull_size = 5
|
||||
can_pull_mobs = MOB_PULL_SAME
|
||||
holder_type = /obj/item/weapon/holder/drone/heavy
|
||||
range_limit = 0
|
||||
|
||||
/mob/living/silicon/robot/drone/Initialize()
|
||||
. = ..()
|
||||
@@ -282,6 +280,12 @@
|
||||
|
||||
//DRONE LIFE/DEATH
|
||||
/mob/living/silicon/robot/drone/process_level_restrictions()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
if((!T || !(A in the_station_areas)) && src.stat != DEAD)
|
||||
to_chat(src,"WARNING: Removal from NanoTrasen property detected. Anti-Theft mode activated.")
|
||||
gib()
|
||||
return
|
||||
return
|
||||
|
||||
//For some goddamn reason robots have this hardcoded. Redefining it for our fragile friends here.
|
||||
@@ -297,11 +301,7 @@
|
||||
//Standard robots use config for crit, which is somewhat excessive for these guys.
|
||||
//Drones killed by damage will gib.
|
||||
/mob/living/silicon/robot/drone/handle_regular_status_updates()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
if((!T || health <= -maxHealth || (range_limit && !(A in the_station_areas))) && src.stat != DEAD)
|
||||
timeofdeath = world.time
|
||||
death() //Possibly redundant, having trouble making death() cooperate.
|
||||
if(health <= -maxHealth && src.stat != DEAD)
|
||||
gib()
|
||||
return
|
||||
..()
|
||||
@@ -413,6 +413,17 @@
|
||||
real_name = "construction drone ([rand(100,999)])"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/construction/process_level_restrictions()
|
||||
//Abort if they should not get blown
|
||||
if (lockcharge || scrambledcodes || emagged)
|
||||
return
|
||||
//Check if they are not on station level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || isNotStationLevel(T.z))
|
||||
return
|
||||
to_chat(src,"WARNING: Lost contact with controller. Anti-Theft mode activated.")
|
||||
gib()
|
||||
|
||||
/proc/too_many_active_drones()
|
||||
var/drones = 0
|
||||
for(var/mob/living/silicon/robot/drone/D in mob_list)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
dat += "<B>Maintenance Units</B><BR>"
|
||||
|
||||
for(var/mob/living/silicon/robot/drone/D in silicon_mob_list)
|
||||
if(src.z in current_map.station_levels && !(D.z in current_map.station_levels)) //If the console is on a station level, then list all drones on the station levels
|
||||
if(isStationLevel(src.z) && isNotStationLevel(D.z)) //If the console is on a station level, then list all drones on the station levels
|
||||
continue
|
||||
else if (!(src.z in current_map.station_levels) && src.z != D.z) //If the console is not on the station, only list drones on the current level
|
||||
else if (isNotStationLevel(src.z) && src.z != D.z) //If the console is not on the station, only list drones on the current level
|
||||
continue
|
||||
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE</FONT>" : "<font color='green'>ACTIVE</FONT>"])"
|
||||
dat += "<font dize = 9><BR>Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
return
|
||||
//Check if they are on a player level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || (T.z in current_map.player_levels))
|
||||
if (!T || isStationLevel(T.z))
|
||||
return
|
||||
//If they are on centcom -> abort
|
||||
if (istype(get_area(src), /area/centcom) || istype(get_area(src), /area/shuttle/escape) || istype(get_area(src), /area/shuttle/arrival))
|
||||
|
||||
Reference in New Issue
Block a user