Station Blueprint Hotfix (#8692)

Station Blueprints now count asteroid turf as space, this should reduce server crashing when using them.
This commit is contained in:
Geeves
2020-04-20 10:41:36 +02:00
committed by GitHub
parent ff621d50b7
commit 482bca5a95
4 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
if (!istype(loc, /turf/simulated/floor))
to_chat(usr, "<span class='danger'>\The [src] Alarm cannot be placed on this spot.</span>")
return
if (A.requires_power == 0 || A.name == "Space")
if (A.requires_power == FALSE || istype(A, /area/space) || istype(A, /area/mine))
to_chat(usr, "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>")
return
+6 -6
View File
@@ -19,8 +19,8 @@
var/const/ROOM_ERR_SPACE = -1
var/const/ROOM_ERR_TOOLARGE = -2
/obj/item/blueprints/attack_self(mob/user as mob)
if (use_check_and_message(user, USE_DISALLOW_SILICONS))
/obj/item/blueprints/attack_self(mob/user)
if(use_check_and_message(user, USE_DISALLOW_SILICONS))
return
add_fingerprint(user)
interact()
@@ -28,13 +28,13 @@
/obj/item/blueprints/Topic(href, href_list)
..()
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if(use_check_and_message(usr, USE_DISALLOW_SILICONS) || usr.get_active_hand() != src)
return
if (!href_list["action"])
if(!href_list["action"])
return
switch(href_list["action"])
if ("create_area")
if (get_area_type()!=AREA_SPACE)
if(get_area_type() != AREA_SPACE)
interact()
return
create_area()
@@ -172,7 +172,7 @@ move an amendment</a> to the drawing.</p>
CHECK_TICK
/obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir)
if (istype(T2, /turf/space))
if (istype(T2, /turf/space) || istype(T2, /turf/unsimulated/floor/asteroid))
return BORDER_SPACE //omg hull breach we all going to die here
if (get_area_type(T2.loc)!=AREA_SPACE)
return BORDER_BETWEEN
+1 -1
View File
@@ -111,7 +111,7 @@
var/main_status = 0
var/mob/living/silicon/ai/hacker = null // Malfunction var. If set AI hacked the APC and has full control.
var/wiresexposed = 0
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :c
var/debug = 0
var/autoflag= 0 // 0 = off, 1= eqp and lights off, 2 = eqp off, 3 = all on.
var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver
@@ -0,0 +1,7 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Station Blueprints now count asteroid turf as space, this should reduce server crashing when using them."
- bugfix: "Air alarms and APCs now self-destruct when they detect their area as being within a mine or space area."