Gang v3 has been tested and is now good to go!

This commit is contained in:
Ikarrus
2015-04-19 22:26:15 -06:00
parent af7131c7ad
commit 4ff044dc78
22 changed files with 186 additions and 121 deletions
+3 -1
View File
@@ -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"
+12 -6
View File
@@ -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
+1 -1
View File
@@ -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()
+26 -39
View File
@@ -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 <b>Gangtool</b> 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 <b>Gangtool</b> 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 <b>territory spraycan</b> 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 <b>territory spraycan</b> 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 << "<FONT size=3 color=red><B>You are now a member of the [gang=="A" ? gang_name("A") : gang_name("B")] Gang!</B></FONT>"
gangster_mind.current << "<font color='red'>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.</font>"
gangster_mind.current << "<font color='red'>You can identify your bosses by their brown \"B\" icon.</font>"
gangster_mind.current << "<font color='red'>You can identify your bosses by their brown \"G\" icon.</font>"
gangster_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been converted to the [gang=="A" ? "[gang_name("A")] Gang (A)" : "[gang_name("B")] Gang (B)"]!</font>"
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 << "<br><b>The [gang_name("A")] Gang was [winner=="A" ? "<font color=green>victorious</font>" : "<font color=red>defeated</font>"] with [num_ganga] members!</b>"
world << "<br><b>The [gang_name("A")] Gang was [winner=="A" ? "<font color=green>victorious</font>" : "<font color=red>defeated</font>"] with [round((ticker.mode.A_territory.len/start_state.num_territories)*100, 0.1)]% control of the station!</b>"
world << "<br>The [gang_name("A")] Gang Bosses were:"
gang_membership_report(A_bosses)
world << "<br>The [gang_name("A")] Gangsters were:"
@@ -328,7 +314,7 @@
if(B_bosses.len || B_gang.len)
if(winner)
world << "<br><b>The [gang_name("B")] Gang was [winner=="B" ? "<font color=green>victorious</font>" : "<font color=red>defeated</font>"] with [num_gangb] members!</b>"
world << "<br><b>The [gang_name("B")] Gang was [winner=="B" ? "<font color=green>victorious</font>" : "<font color=red>defeated</font>"] with [round((ticker.mode.B_territory.len/start_state.num_territories)*100, 0.1)]% control of the station!</b></b>"
world << "<br>The [gang_name("B")] Gang Bosses were:"
gang_membership_report(B_bosses)
world << "<br>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 << "<span class='notice'>\icon[tool] [message]</span>"
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 << "<span class='notice'>\icon[tool] [message]</span>"
if(beeps)
playsound(mob.loc, 'sound/machines/twobeep.ogg', 50, 1)
+32 -6
View File
@@ -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]")
ticker.mode.message_gangtools(recipients,"Territory lost: [territory]",0)
..()
+1 -1
View File
@@ -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()
+19 -7
View File
@@ -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 << "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>"
@@ -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("<span class='danger'> [user] sprays [src] into the face of [target]!</span>")
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
instant = -1
+33 -23
View File
@@ -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 += "<i>Registered as [boss ? "Administrator." : "User."]</i>"
dat += "<i>Registered as [boss ? "Administrator." : "User."]</i><br>"
dat += "Organization: <B>[(gang == "A")?("[gang_name("A")] Gang"):("[gang_name("B")] Gang")]</B><br>"
dat += "Organization Size: <B>[gang_size]</B><br>"
dat += "Areas Controlled: <B>[gang_territory] ([(gang_territory/start_state.num_territories)*100]% of [station_name()])</B><br>"
dat += "Areas Controlled: <B>[gang_territory] ([round((gang_territory/start_state.num_territories)*100, 0.1)]% of station)</B><br>"
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
dat += "<br>"
dat += "Supply Points: <B>[points]</B><br>"
dat += "Time until next point collection: <B>[(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
dat += "Influence: <B>[points]</B><br>"
dat += "Time until Influence grows: <B>[(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
dat += "<B>Purchase Items:</B><br>"
if(points >= 30)
dat += "(30 SP) <a href='?src=\ref[src];purchase=pistol'>10mm Pistol</a><br>"
if(points >= 25)
dat += "(25 Influence) <a href='?src=\ref[src];purchase=pistol'>10mm Pistol</a><br>"
else
dat += "(30 SP) 10mm Pistol<br>"
dat += "(25 Influence) 10mm Pistol<br>"
if(points >= 10)
dat += "(10 SP) <a href='?src=\ref[src];purchase=ammo'>10mm Ammo</a><br>"
dat += "(10 Influence) <a href='?src=\ref[src];purchase=ammo'>10mm Ammo</a><br>"
else
dat += "(10 SP) 10mm Ammo<br>"
dat += "(10 Influence) 10mm Ammo<br>"
if(points >= 10)
dat += "(10 SP) <a href='?src=\ref[src];purchase=spraycan'>Territory Spraycan</a><br>"
dat += "(10 Influence) <a href='?src=\ref[src];purchase=spraycan'>Territory Spraycan</a><br>"
else
dat += "(10 SP) Territory Spraycan<br>"
dat += "(10 Influence) Territory Spraycan<br>"
if(points >= 50)
dat += "(50 SP) <a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
dat += "(50 Influence) <a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
else
dat += "(50 SP) Recruitment Pen<br>"
dat += "(50 Influence) Recruitment Pen<br>"
if(boss)
if(points >= 40)
dat += "(40 SP) <a href='?src=\ref[src];purchase=gangtool'>Promote a Gangster</a><br>"
dat += "(40 Influence) <a href='?src=\ref[src];purchase=gangtool'>Unregistered Gangtool</a><br>"
else
dat += "(40 SP) Promote a Gangster<br>"
dat += "(40 Influence) Unregistered Gangtool<br>"
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
@@ -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 << "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>"
user << "<font color='red'>The <b>Gangtool</b> 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.</font>"
user << "<font color='red'>The <b>Gangtool</b> 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.</font>"
user << "<font color='red'>You may also now use recruitment pens to grow your gang membership. Use them on unsuspecting crew members to recruit them.</font>"
if(!gang)
usr << "<span class='warning'>ACCESS DENIED: Unauthorized user.</span>"
@@ -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 << "<span class='warning'>\icon[src] ACCESS DENIED: Unauthorized user.</span>"
return 0
/obj/item/device/gangtool/lt
+38 -28
View File
@@ -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("<span class='suicide'>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</span>")
@@ -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 << "<span class='danger'>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!</span>"
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 << "<span class='danger'>[territory] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!</span>"
return 1
return 0
/*
* Snap pops
*/
+3 -1
View File
@@ -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)
+5 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -386,7 +386,7 @@
dat += "</table>"
if(ticker.mode.A_bosses.len || ticker.mode.A_gang.len)
dat += "<br><table cellspacing=5><tr><td><B>[gang_name("A")] Gang Members</B></td><td></td></tr>"
dat += "<br><table cellspacing=5><tr><td><B>[gang_name("A")] Gang: [round((ticker.mode.A_territory.len/start_state.num_territories)*100, 0.1)]% Station Control</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.A_bosses)
var/mob/M = N.current
if(!M)
@@ -402,7 +402,7 @@
dat += "</table>"
if(ticker.mode.B_bosses.len || ticker.mode.B_gang.len)
dat += "<br><table cellspacing=5><tr><td><B>[gang_name("B")] Gang Members</B></td><td></td></tr>"
dat += "<br><table cellspacing=5><tr><td><B>[gang_name("B")] Gang: [round((ticker.mode.B_territory.len/start_state.num_territories)*100, 0.1)]% Station Control</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.B_bosses)
var/mob/M = N.current
if(!M)
+3
View File
@@ -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)
+4
View File
@@ -97,6 +97,8 @@
M.Paralyse(5)
M.Jitter(500)
cooldown(ticker.mode.A_gang.len, )
spawn(40)
M.jitteriness -= 490
else
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
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 << "<span class='warning'>This mind is resistant to recruitment!</span>"
else
+2 -3
View File
@@ -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
+1 -1
View File
@@ -1 +1 @@
extended
gang
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 1.1 KiB