diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 719c6bfeae7..da4a45d31b9 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -28,7 +28,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
mouse_opacity = 0
invisibility = INVISIBILITY_LIGHTING
var/lightswitch = 1
- var/player_defined = 0 //If it was created by players in-game as opposed to existing at compile time
+ var/valid_territory = 1 //If it's a valid territory for gangs to claim
var/eject = null
@@ -110,6 +110,7 @@ proc/process_ghost_teleport_locs()
power_light = 0
power_equip = 0
power_environ = 0
+ valid_territory = 0
ambientsounds = list('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
@@ -347,6 +348,7 @@ proc/process_ghost_teleport_locs()
//Maintenance
/area/maintenance
ambientsounds = list('sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg', 'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg', 'sound/ambience/ambimaint5.ogg')
+ valid_territory = 0
/area/maintenance/atmos_control
name = "Atmospherics Maintenance"
diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm
index 7fa366c32c2..d08526eda5d 100644
--- a/code/game/gamemodes/blob/blob_report.dm
+++ b/code/game/gamemodes/blob/blob_report.dm
@@ -54,10 +54,10 @@
var/door = 0
var/grille = 0
var/mach = 0
- var/num_territories = 0//Number of total valid territories for gang mode
+ var/num_territories = 1//Number of total valid territories for gang mode
-/datum/station_state/proc/count()
+/datum/station_state/proc/count(var/count_territories)
for(var/turf/T in block(locate(1,1,1), locate(world.maxx,world.maxy,1)))
if(istype(T,/turf/simulated/floor))
@@ -89,10 +89,16 @@
else if(istype(O, /obj/machinery))
src.mach += 1
- var/list/valid_territories = list()
- for(var/area/A in block(locate(1,1,1), locate(world.maxx,world.maxy,1)))
- valid_territories |= A.type
- num_territories = valid_territories.len - 1 //Minus space
+ if(count_territories)
+ var/list/valid_territories = list()
+ for(var/area/A in world) //First, collect all area types on the station zlevel
+ if(A.z == ZLEVEL_STATION)
+ if(!(A.type in valid_territories) && A.valid_territory)
+ valid_territories |= A.type
+ if(valid_territories.len)
+ num_territories = valid_territories.len //Add them all up to make the total number of area types
+ else
+ world << "ERROR: NO VALID TERRITORIES"
/datum/station_state/proc/score(var/datum/station_state/result)
if(!result) return 0
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 5ab109066d8..2e3654f7b6a 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -84,7 +84,7 @@
spawn (rand(waittime_l, waittime_h))
send_intercept(0)
start_state = new /datum/station_state()
- start_state.count()
+ start_state.count(1)
return 1
///make_antag_chance()
diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm
index 297086acc07..1432c50efd7 100644
--- a/code/game/gamemodes/gang/gang.dm
+++ b/code/game/gamemodes/gang/gang.dm
@@ -9,8 +9,8 @@
var/obj/item/device/gangtool/A_tools = list()
var/obj/item/device/gangtool/B_tools = list()
var/datum/gang_points/gang_points
- var/list/area/A_territory = list()
- var/list/area/B_territory = list()
+ var/list/A_territory = list()
+ var/list/B_territory = list()
/datum/game_mode/gang
name = "gang war"
@@ -142,8 +142,8 @@
mob << "Your Syndicate benefactors were unfortunately unable to get you a Gangtool."
else
gangtool.register_device(mob)
- mob << "The Gangtool in your [where] will allow you to purchase items for your gang and prevent the station from evacuating before you can take over. Use it to recall the emergency shuttle from anywhere on the station."
- mob << "You can also promote your gang members to lieutenant by giving them an unregistered gangtool. Lieutenants cannot be deconverted and are able to use recrtuitment pens and gangtools."
+ mob << "The Gangtool in your [where] will allow you to use your influence to purchase items and prevent the station from evacuating before you can take over. Use it to recall the emergency shuttle from anywhere on the station."
+ mob << "You can also promote your gang members to lieutenant by giving them an unregistered gangtool. Lieutenants cannot be deconverted and are able to use recruitment pens and gangtools."
. += 1
var/where2 = mob.equip_in_one_of_slots(T, slots)
@@ -157,7 +157,7 @@
if (!where3)
mob << "Your Syndicate benefactors were unfortunately unable to get you a territory spraycan to start."
else
- mob << "The territory spraycan in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more supply points you get."
+ mob << "The territory spraycan in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more influence you get."
. += 1
mob.update_icons()
@@ -167,16 +167,16 @@
//Checks if the either gang have won or not//
/////////////////////////////////////////////
/datum/game_mode/gang/check_win()
- if(ticker.mode.A_territory.len > (start_state.num_territories / 2))
+ if(A_territory.len > (start_state.num_territories / 2))
finished = "A" //Gang A wins
- else if(ticker.mode.B_territory.len > (start_state.num_territories / 2))
+ else if(B_territory.len > (start_state.num_territories / 2))
finished = "B" //Gang B wins
///////////////////////////////
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/gang/check_finished()
- if(finished && !config.continuous["gang"])
+ if(finished)
return 1
return ..() //Check for evacuation/nuke
@@ -200,7 +200,7 @@
gangster_mind.current.Stun(5)
gangster_mind.current << "You are now a member of the [gang=="A" ? gang_name("A") : gang_name("B")] Gang!"
gangster_mind.current << "Help your bosses take over the station by claiming territory with the special spraycans they provide. Simply spray on any unclaimed area of the station."
- gangster_mind.current << "You can identify your bosses by their brown \"B\" icon."
+ gangster_mind.current << "You can identify your bosses by their brown \"G\" icon."
gangster_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the [gang=="A" ? "[gang_name("A")] Gang (A)" : "[gang_name("B")] Gang (B)"]!"
gangster_mind.special_role = "[gang=="A" ? "[gang_name("A")] Gang (A)" : "[gang_name("B")] Gang (B)"]"
update_gang_icons_added(gangster_mind,gang)
@@ -303,23 +303,9 @@
else
winner = "Draw"
- var/num_ganga = 0
- var/list/agang = A_gang + A_bosses
- for(var/datum/mind/agangster in agang)
- if(agangster.current)
- if(agangster.current in living_mob_list)
- num_ganga++
-
- var/num_gangb = 0
- var/list/bgang = B_gang + B_bosses
- for(var/datum/mind/bgangster in bgang)
- if(bgangster.current)
- if(bgangster.current in living_mob_list)
- num_gangb++
-
if(A_bosses.len || A_gang.len)
if(winner)
- world << "
The [gang_name("A")] Gang was [winner=="A" ? "victorious" : "defeated"] with [num_ganga] members!"
+ world << "
The [gang_name("A")] Gang was [winner=="A" ? "victorious" : "defeated"] with [round((ticker.mode.A_territory.len/start_state.num_territories)*100, 0.1)]% control of the station!"
world << "
The [gang_name("A")] Gang Bosses were:"
gang_membership_report(A_bosses)
world << "
The [gang_name("A")] Gangsters were:"
@@ -328,7 +314,7 @@
if(B_bosses.len || B_gang.len)
if(winner)
- world << "
The [gang_name("B")] Gang was [winner=="B" ? "victorious" : "defeated"] with [num_gangb] members!"
+ world << "
The [gang_name("B")] Gang was [winner=="B" ? "victorious" : "defeated"] with [round((ticker.mode.B_territory.len/start_state.num_territories)*100, 0.1)]% control of the station!"
world << "
The [gang_name("B")] Gang Bosses were:"
gang_membership_report(B_bosses)
world << "
The [gang_name("B")] Gangsters were:"
@@ -370,21 +356,22 @@
income()
/datum/gang_points/proc/income()
- var/A_new = max(100(A + 10 + ticker.mode.A_territory.len))
+ var/A_new = min(100,(A + 10 + ticker.mode.A_territory.len))
var/A_message = ""
- if(A_new > A)
- A_message += "Your gang has collected [A_new - A] additional supply points from the station."
+ if(A_new != A)
+ A_message += "Your gang has gained [A_new - A] Influence from their presence on station."
if(A_new == 100)
- A_message += "Maximum supply point count reached."
+ A_message += "Maximum influence reached."
A = A_new
ticker.mode.message_gangtools(ticker.mode.A_tools,A_message)
- var/B_new = max(100,(B + 10 + ticker.mode.B_territory.len))
+ var/B_new = min(100,(B + 10 + ticker.mode.B_territory.len))
var/B_message = ""
- if(B_new > B)
- B_message += "Your gang has collected [B_new - B] additional supply points from the station. "
+ if(B_new != B)
+ B_message += "Your gang has collected [B_new - B] Influence from their presence on station. "
if(B_new == 100)
- B_message += "Maximum supply point count reached."
+ B_message += "Maximum influence reached."
+ B = B_new
ticker.mode.message_gangtools(ticker.mode.B_tools,B_message)
start()
@@ -394,13 +381,13 @@
//Sends a message to the boss via his gangtool//
////////////////////////////////////////////////
-/datum/game_mode/proc/message_gangtools(var/list/gangtools,var/message)
+/datum/game_mode/proc/message_gangtools(var/list/gangtools,var/message,var/beeps=1)
if(!gangtools.len || !message)
return
for(var/obj/item/device/gangtool/tool in gangtools)
var/mob/living/mob = get(tool.loc,/mob/living)
- if(mob)
- if(mob.mind)
- playsound(mob.loc, 'sound/machines/twobeep.ogg', 50, 1)
- if(((tool.gang == "A") && ((mob.mind in A_gang) || (mob.mind in A_bosses))) || ((tool.gang == "B") && ((mob.mind in B_gang) || (mob.mind in B_bosses))))
- mob << "\icon[tool] [message]"
\ No newline at end of file
+ if(mob && mob.mind)
+ if(((tool.gang == "A") && ((mob.mind in A_gang) || (mob.mind in A_bosses))) || ((tool.gang == "B") && ((mob.mind in B_gang) || (mob.mind in B_bosses))))
+ mob << "\icon[tool] [message]"
+ if(beeps)
+ playsound(mob.loc, 'sound/machines/twobeep.ogg', 50, 1)
\ No newline at end of file
diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm
index c30db111525..7c460171a90 100644
--- a/code/game/objects/effects/decals/crayon.dm
+++ b/code/game/objects/effects/decals/crayon.dm
@@ -27,20 +27,46 @@
color = main
/obj/effect/decal/cleanable/crayon/gang
+ layer = 3.6 //Harder to hide
var/gang
-/obj/effect/decal/cleanable/crayon/gang/New()
- world << "DEBUG: A[ticker.mode.A_territory.len] B[ticker.mode.B_territory.len] Goal[start_state.num_territories / 2]"
+/obj/effect/decal/cleanable/crayon/gang/New(location, var/type, var/e_name = "gang tag", var/rotation = 0)
+ if(!type)
+ qdel(src)
+
+ var/area/territory = get_area(location)
+ var/list/recipients = list()
+ var/color
+
+ if(type == "A")
+ gang = type
+ color = "#00b4ff"
+ icon_state = gang_name("A")
+ recipients = ticker.mode.A_tools
+ ticker.mode.A_territory |= territory.type
+ else if(type == "B")
+ gang = type
+ color = "#ff3232"
+ icon_state = gang_name("B")
+ recipients = ticker.mode.B_tools
+ ticker.mode.B_territory |= territory.type
+
+ if(recipients.len)
+ ticker.mode.message_gangtools(recipients,"New territory claimed: [territory]",0)
+
+ ..(location, color, icon_state, e_name, rotation)
/obj/effect/decal/cleanable/crayon/gang/Destroy()
var/area/territory = get_area(src)
- var/list/recipients
+ var/list/recipients = list()
if(gang == "A")
- recipients = ticker.mode.A_tools
+ recipients += ticker.mode.A_tools
ticker.mode.A_territory -= territory.type
if(gang == "B")
- recipients = ticker.mode.B_tools
+ recipients += ticker.mode.B_tools
ticker.mode.B_territory -= territory.type
if(recipients.len)
- ticker.mode.message_gangtools(recipients,"Territory lost: [territory]")
\ No newline at end of file
+ ticker.mode.message_gangtools(recipients,"Territory lost: [territory]",0)
+
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 1031bab35d8..819bcc01339 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -155,7 +155,7 @@
A.power_light = 0
A.power_environ = 0
A.always_unpowered = 0
- A.player_defined = 1
+ A.valid_territory = 0
move_turfs_to_area(turfs, A)
A.SetDynamicLighting()
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index eb05aa3569b..fbffa30e777 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -91,15 +91,26 @@
desc = "A metallic container containing tasty paint."
var/capped = 1
instant = 1
+ edible = 0
validSurfaces = list(/turf/simulated/floor,/turf/simulated/wall)
/obj/item/toy/crayon/spraycan/New()
..()
- name = "NanoTrasen-brand Rapid Paint Applicator"
+ if(gang)
+ name = "Modified Paint Applicator"
+ else
+ name = "NanoTrasen-brand Rapid Paint Applicator"
update_icon()
+/obj/item/toy/crayon/spraycan/examine(mob/user)
+ ..()
+ if(uses)
+ user << "It has [uses] uses left."
+ else
+ user << "It is empty."
+
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
- var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color")
+ var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color","Cancel")
switch(choice)
if("Toggle Cap")
user << "You [capped ? "Remove" : "Replace"] the cap of the [src]"
@@ -119,8 +130,9 @@
return
else
if(iscarbon(target))
- if(uses-10 > 0)
- uses = uses - 10
+ if(uses)
+ playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
+ uses = max(0,uses-10)
var/mob/living/carbon/human/C = target
user.visible_message(" [user] sprays [src] into the face of [target]!")
if(C.client)
@@ -132,7 +144,6 @@
C.lip_style = "spray_face"
C.lip_color = colour
C.update_body()
- playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
..()
/obj/item/toy/crayon/spraycan/update_icon()
@@ -142,7 +153,8 @@
overlays += I
/obj/item/toy/crayon/spraycan/gang
+ desc = "A suspicious-looking spraycan modified to use special paint used by gangsters to mark territory."
icon_state = "spraycan_gang_cap"
- desc = "A modified spraycan containing special paint used by gangsters to mark territory."
+ uses = 20
gang = 1
- instant = 0
\ No newline at end of file
+ instant = -1
\ No newline at end of file
diff --git a/code/game/objects/items/devices/recaller.dm b/code/game/objects/items/devices/recaller.dm
index 7340eaccf8a..226ae801ee0 100644
--- a/code/game/objects/items/devices/recaller.dm
+++ b/code/game/objects/items/devices/recaller.dm
@@ -18,6 +18,8 @@
if(!ticker.mode.gang_points)
ticker.mode.gang_points = new /datum/gang_points(ticker.mode)
ticker.mode.gang_points.start()
+ if(boss)
+ desc += " Looks important."
/obj/item/device/gangtool/attack_self(mob/user)
if (!can_use(user))
@@ -32,41 +34,41 @@
var/gang_territory = ((gang == "A")? ticker.mode.A_territory.len : ticker.mode.B_territory.len)
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
- dat += "Registered as [boss ? "Administrator." : "User."]"
+ dat += "Registered as [boss ? "Administrator." : "User."]
"
dat += "Organization: [(gang == "A")?("[gang_name("A")] Gang"):("[gang_name("B")] Gang")]
"
dat += "Organization Size: [gang_size]
"
- dat += "Areas Controlled: [gang_territory] ([(gang_territory/start_state.num_territories)*100]% of [station_name()])
"
+ dat += "Areas Controlled: [gang_territory] ([round((gang_territory/start_state.num_territories)*100, 0.1)]% of station)
"
dat += "Recall Emergency Shuttle
"
dat += "
"
- dat += "Supply Points: [points]
"
- dat += "Time until next point collection: [(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]
"
+ dat += "Influence: [points]
"
+ dat += "Time until Influence grows: [(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]
"
dat += "Purchase Items:
"
- if(points >= 30)
- dat += "(30 SP) 10mm Pistol
"
+ if(points >= 25)
+ dat += "(25 Influence) 10mm Pistol
"
else
- dat += "(30 SP) 10mm Pistol
"
+ dat += "(25 Influence) 10mm Pistol
"
if(points >= 10)
- dat += "(10 SP) 10mm Ammo
"
+ dat += "(10 Influence) 10mm Ammo
"
else
- dat += "(10 SP) 10mm Ammo
"
+ dat += "(10 Influence) 10mm Ammo
"
if(points >= 10)
- dat += "(10 SP) Territory Spraycan
"
+ dat += "(10 Influence) Territory Spraycan
"
else
- dat += "(10 SP) Territory Spraycan
"
+ dat += "(10 Influence) Territory Spraycan
"
if(points >= 50)
- dat += "(50 SP) Recruitment Pen
"
+ dat += "(50 Influence) Recruitment Pen
"
else
- dat += "(50 SP) Recruitment Pen
"
+ dat += "(50 Influence) Recruitment Pen
"
if(boss)
if(points >= 40)
- dat += "(40 SP) Promote a Gangster
"
+ dat += "(40 Influence) Unregistered Gangtool
"
else
- dat += "(40 SP) Promote a Gangster
"
+ dat += "(40 Influence) Unregistered Gangtool
"
dat += "
"
dat += "Refresh
"
@@ -86,9 +88,9 @@
var/item_type
switch(href_list["purchase"])
if("pistol")
- if(points >= 30)
+ if(points >= 25)
item_type = /obj/item/weapon/gun/projectile/automatic/pistol
- points = 30
+ points = 25
if("ammo")
if(points >= 10)
item_type = /obj/item/ammo_box/magazine/m10mm
@@ -114,7 +116,7 @@
var/obj/purchased = new item_type(get_turf(usr))
var/mob/living/carbon/human/H = usr
H.put_in_any_hand_if_possible(purchased)
- ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "Transaction Confirmed: A [href_list["purchase"]] was purchased by [usr] for [points] SP.")
+ ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "A [href_list["purchase"]] was purchased by [usr] for [points] Influence.")
else if(href_list["choice"])
switch(href_list["choice"])
@@ -128,6 +130,7 @@
/obj/item/device/gangtool/proc/register_device(var/mob/user)
var/promoted
if((user.mind in ticker.mode.A_gang) || (user.mind in ticker.mode.A_bosses))
+ ticker.mode.A_tools += src
gang = "A"
if(!(user.mind in ticker.mode.A_bosses))
ticker.mode.remove_gangster(user.mind, 0, 2)
@@ -137,6 +140,7 @@
log_game("[key_name(user)] has been promoted to Lieutenant in the [gang_name("A")] Gang (A)")
promoted = 1
else if((user.mind in ticker.mode.B_gang) || (user.mind in ticker.mode.B_bosses))
+ ticker.mode.B_tools += src
gang = "B"
if(!(user.mind in ticker.mode.B_bosses))
ticker.mode.remove_gangster(user.mind, 0, 2)
@@ -146,8 +150,9 @@
log_game("[key_name(user)] has been promoted to Lieutenant in the [gang_name("B")] Gang (B)")
promoted = 1
if(promoted)
+ ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "[user] has been promoted to Lieutenant.")
user << "You have been promoted to Lieutenant!"
- user << "The Gangtool you registered will allow you to purchase items for your gang and prevent the station from evacuating before your gang can take over. Use it to recall the emergency shuttle from anywhere on the station."
+ user << "The Gangtool you registered will allow you to use your gang's influence to purchase items and prevent the station from evacuating before your gang can take over. Use it to recall the emergency shuttle from anywhere on the station."
user << "You may also now use recruitment pens to grow your gang membership. Use them on unsuspecting crew members to recruit them."
if(!gang)
usr << "ACCESS DENIED: Unauthorized user."
@@ -184,14 +189,19 @@
return
if(!(src in user.contents))
return
+
+ var/success
if(user.mind)
if(gang)
if((gang == "A") && (user.mind in ticker.mode.A_bosses))
- return 1
- if((gang == "B") && (user.mind in ticker.mode.B_bosses))
- return 1
+ success = 1
+ else if((gang == "B") && (user.mind in ticker.mode.B_bosses))
+ success = 1
else
- return 1
+ success = 1
+ if(success)
+ return 1
+ user << "\icon[src] ACCESS DENIED: Unauthorized user."
return 0
/obj/item/device/gangtool/lt
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 9952bb3e128..8e102ad2225 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -329,6 +329,7 @@
var/dat
var/list/validSurfaces = list(/turf/simulated/floor)
var/gang = 0 //For marking territory
+ var/edible = 1
/obj/item/toy/crayon/suicide_act(mob/user)
user.visible_message("[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.")
@@ -398,6 +399,8 @@
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
+ if(istype(target, /obj/effect/decal/cleanable))
+ target = target.loc
if(is_type_in_list(target,validSurfaces))
var/temp = "rune"
if(letters.Find(drawtype))
@@ -405,27 +408,26 @@
else if(graffiti.Find(drawtype))
temp = "graffiti"
+ ////////////////////////// GANG FUNCTIONS
var/area/territory
+ var/gangID
if(gang)
//Check area validity. Reject space, player-created areas, and non-station z-levels.
territory = get_area(target)
- if (territory && (territory.z == ZLEVEL_STATION) && !territory.player_defined && !istype(territory,/area/space))
-
+ if (territory && (territory.z == ZLEVEL_STATION) && territory.valid_territory)
//Determine gang affiliation
if((user.mind in ticker.mode.A_bosses) || (user.mind in ticker.mode.A_gang))
temp = "[gang_name("A")] gang tag"
- drawtype = "ganga"
+ gangID = "A"
else if((user.mind in ticker.mode.B_bosses) || (user.mind in ticker.mode.B_gang))
temp = "[gang_name("B")] gang tag"
- drawtype = "gangb"
+ gangID = "B"
//Check if this area is already tagged by a gang
if(!(locate(/obj/effect/decal/cleanable/crayon/gang) in target)) //Ignore the check if the tile being sprayed has a gang tag
- for(var/area/RA in territory.related)
- var/obj/effect/decal/cleanable/crayon/gang/gangtag = locate(/obj/effect/decal/cleanable/crayon/gang) in RA
- if(gangtag && gangtag.gang)
- user << "Something's wrong... This area has already been tagged by the [gangtag.icon_state] gang! You must get rid of the old tag first, or simply spray over it!"
- return
+ if(territory_claimed(territory, user))
+ return
+ /////////////////////////////////////////
var/graf_rot
if(oriented.Find(drawtype))
@@ -438,30 +440,28 @@
graf_rot = 270
else
graf_rot = 0
- user << "You start drawing a [temp] on the [target.name]."
- if(instant || do_after(user, 50))
+
+ user << "You start [instant ? "spraying" : "drawing"] a [temp] on the [target.name]."
+ if(instant)
+ playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
+ if((instant>0) || do_after(user, 50))
//Gang functions
- if(drawtype == "ganga")
+ if(gangID)
//Delete any old markings on this tile, including other gang tags
+ if(!(locate(/obj/effect/decal/cleanable/crayon/gang) in target)) //Ignore the check if the tile being sprayed has a gang tag
+ if(territory_claimed(territory, user))
+ return
for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
qdel(old_marking)
- var/obj/effect/decal/cleanable/crayon/gang/newtag = new(target,colour,gang_name("A"),temp,graf_rot)
- newtag.gang = "A"
- ticker.mode.A_territory |= territory.type
- ticker.mode.message_gangtools(ticker.mode.A_bosses,"New territory claimed: [territory]")
- if(drawtype == "gangb")
- //Delete any old markings on this tile, including other gang tags
- for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
- qdel(old_marking)
- var/obj/effect/decal/cleanable/crayon/gang/newtag = new(target,colour,gang_name("B"),temp,graf_rot)
- newtag.gang = "B"
- ticker.mode.B_territory |= territory.type
- ticker.mode.message_gangtools(ticker.mode.B_bosses,"New territory claimed: [territory]")
+ new /obj/effect/decal/cleanable/crayon/gang(target,gangID,temp,graf_rot)
else
new /obj/effect/decal/cleanable/crayon(target,colour,drawtype,temp,graf_rot)
- user << "You finish drawing [temp]."
+
+ user << "You finish [instant ? "spraying" : "drawing"] [temp]."
+ if(instant<0)
+ playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
if(uses)
uses--
if(!uses)
@@ -470,9 +470,8 @@
return
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
- var/huffable = istype(src,/obj/item/toy/crayon/spraycan)
- if(M == user)
- user << "You take a [huffable ? "huff" : "bite"] of the [src.name]. Delicious!"
+ if(edible && (M == user))
+ user << "You take a bite of the [src.name]. Delicious!"
user.nutrition += 5
if(uses)
uses -= 5
@@ -482,6 +481,17 @@
else
..()
+/obj/item/toy/crayon/proc/territory_claimed(var/area/territory,mob/user)
+ var/occupying_gang
+ if(territory.type in ticker.mode.A_territory)
+ occupying_gang = gang_name("A")
+ if(territory.type in ticker.mode.B_territory)
+ occupying_gang = gang_name("B")
+ if(occupying_gang)
+ user << "[territory] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!"
+ return 1
+ return 0
+
/*
* Snap pops
*/
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index f08ddf39317..22ee1031980 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -21,8 +21,10 @@
obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
+ A.thermite = 0
var/turf/simulated/floor/F = A
- F.dirt = 0
+ if(istype(F))
+ F.dirt = 0
for(var/obj/effect/O in A)
if(istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index fef4bbef000..c0ebdc6ed13 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -23,7 +23,11 @@
if(wet_overlay)
overlays -= wet_overlay
wet_overlay = null
- wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static")
+ var/turf/simulated/floor/F = src
+ if(istype(F))
+ wet_overlay = image('icons/effects/water.dmi', src, "wet_floor_static")
+ else
+ wet_overlay = image('icons/effects/water.dmi', src, "wet_static")
overlays += wet_overlay
spawn(rand(790, 820)) // Purely so for visual effect
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 76206f08ab6..06843b8b32d 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -144,7 +144,7 @@
if(try_wallmount(W,user,T) || try_decon(W,user,T) || try_destroy(W,user,T))
return
- return attack_hand(user)
+ return
/turf/simulated/wall/proc/try_wallmount(obj/item/weapon/W as obj, mob/user as mob, turf/T as turf)
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index be61dd07461..478231185de 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -386,7 +386,7 @@
dat += ""
if(ticker.mode.A_bosses.len || ticker.mode.A_gang.len)
- dat += "
| [gang_name("A")] Gang Members | |
"
+ dat += "
| [gang_name("A")] Gang: [round((ticker.mode.A_territory.len/start_state.num_territories)*100, 0.1)]% Station Control | |
"
for(var/datum/mind/N in ticker.mode.A_bosses)
var/mob/M = N.current
if(!M)
@@ -402,7 +402,7 @@
dat += "
"
if(ticker.mode.B_bosses.len || ticker.mode.B_gang.len)
- dat += "
| [gang_name("B")] Gang Members | |
"
+ dat += "
| [gang_name("B")] Gang: [round((ticker.mode.B_territory.len/start_state.num_territories)*100, 0.1)]% Station Control | |
"
for(var/datum/mind/N in ticker.mode.B_bosses)
var/mob/M = N.current
if(!M)
diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm
index d1a24a9a9bc..7c7eb7264a5 100644
--- a/code/modules/lighting/lighting_system.dm
+++ b/code/modules/lighting/lighting_system.dm
@@ -239,6 +239,9 @@
if(!path || path == type) //Sucks this is here but it would cause problems otherwise.
return ..()
+ for(var/obj/effect/decal/cleanable/decal in src.contents)
+ qdel(decal)
+
if(light)
qdel(light)
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 4331862da77..75303ca55c5 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -97,6 +97,8 @@
M.Paralyse(5)
M.Jitter(500)
cooldown(ticker.mode.A_gang.len, )
+ spawn(40)
+ M.jitteriness -= 490
else
user << "This mind is resistant to recruitment!"
else if(user.mind in ticker.mode.B_bosses)
@@ -104,6 +106,8 @@
M.Paralyse(5)
M.Jitter(500)
cooldown(ticker.mode.B_gang.len)
+ spawn(40)
+ M.jitteriness -= 490
else
user << "This mind is resistant to recruitment!"
else
diff --git a/config/game_options.txt b/config/game_options.txt
index e6116e80030..ae06f1b3675 100644
--- a/config/game_options.txt
+++ b/config/game_options.txt
@@ -83,14 +83,14 @@ PROBABILITY DOUBLE_AGENTS 3
PROBABILITY NUCLEAR 2
PROBABILITY REVOLUTION 2
PROBABILITY SHADOWLING 2
-PROBABILITY GANG 0
+PROBABILITY GANG 2
PROBABILITY CULT 2
PROBABILITY CHANGELING 2
PROBABILITY WIZARD 4
PROBABILITY MALFUNCTION 1
PROBABILITY BLOB 2
PROBABILITY RAGINMAGES 2
-PROBABILITY MONKEY 1
+PROBABILITY MONKEY 0
PROBABILITY METEOR 0
PROBABILITY EXTENDED 0
@@ -103,7 +103,6 @@ PROBABILITY SANDBOX 0
## Unlisted modes are not currently supported for noncontinous play
#CONTINUOUS REVOLUTION
-#CONTINUOUS GANG
CONTINUOUS WIZARD
CONTINUOUS MALFUNCTION
CONTINUOUS BLOB
diff --git a/data/mode.txt b/data/mode.txt
index cf1ffd5c991..3ee55accb2c 100644
--- a/data/mode.txt
+++ b/data/mode.txt
@@ -1 +1 @@
-extended
\ No newline at end of file
+gang
diff --git a/icons/effects/crayondecal.dmi b/icons/effects/crayondecal.dmi
index e22bf5c64b9..5525d3b1cbf 100644
Binary files a/icons/effects/crayondecal.dmi and b/icons/effects/crayondecal.dmi differ
diff --git a/icons/effects/water.dmi b/icons/effects/water.dmi
index e6387973bf8..b980915653d 100644
Binary files a/icons/effects/water.dmi and b/icons/effects/water.dmi differ
diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi
index 84ed7d9fc07..4f1f25c3a4b 100644
Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ
diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi
index 5ad94298551..3e50217bb16 100644
Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ
diff --git a/icons/obj/crayons.dmi b/icons/obj/crayons.dmi
index 7d3489285c3..a3966103053 100644
Binary files a/icons/obj/crayons.dmi and b/icons/obj/crayons.dmi differ