Dominators require an open space, except it works this time

This commit is contained in:
CitadelStationBot
2017-05-12 11:11:34 -05:00
parent 91c58632b3
commit 5625ff030a
3 changed files with 33 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
diff a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm (rejected hunks)
@@ -1,5 +1,5 @@
#define DOM_BLOCKED_SPAM_CAP 6
-#define DOM_REQUIRED_TURFS 25
+#define DOM_REQUIRED_TURFS 30
/obj/machinery/dominator
name = "dominator"
@@ -22,7 +22,7 @@
/proc/dominator_excessive_walls(atom/A)
var/open = 0
- for(var/turf/T in circleviewturfs(A, 3))
+ for(var/turf/T in view(3, A))
if(!isclosedturf(T))
open++
if(open < DOM_REQUIRED_TURFS)

View File

@@ -131,7 +131,7 @@
id = "pistol_ammo"
cost = 10
item_path = /obj/item/ammo_box/magazine/m10mm
/datum/gang_item/weapon/sniper
name = ".50cal Sniper Rifle"
id = "sniper"
@@ -156,8 +156,8 @@
id = "uzi_ammo"
cost = 40
item_path = /obj/item/ammo_box/magazine/uzim9mm
///////////////////
//EQUIPMENT
///////////////////
@@ -171,7 +171,7 @@
id = "spraycan"
cost = 5
item_path = /obj/item/toy/crayon/spraycan/gang
/datum/gang_item/equipment/sharpener
name = "Sharpener"
id = "whetstone"

View File

@@ -0,0 +1,12 @@
diff a/code/game/gamemodes/gang/gang_items.dm b/code/game/gamemodes/gang/gang_items.dm (rejected hunks)
@@ -306,6 +306,10 @@
to_chat(user, "<span class='warning'>There's not enough room here!</span>")
return FALSE
+ if(dominator_excessive_walls(user))
+ to_chat(user, "span class='warning'>The <b>dominator</b> will not function here! The <b>dominator</b> requires a sizable open space within three standard units so that walls do not interfere with the signal.</span>")
+ return FALSE
+
if(!(usrarea.type in gang.territory|gang.territory_new))
to_chat(user, "<span class='warning'>The <b>dominator</b> can be spawned only on territory controlled by your gang!</span>")
return FALSE