mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Datum-Based Gangs
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#define ANTAG_HUD_CULT 5
|
||||
#define ANTAG_HUD_REV 6
|
||||
#define ANTAG_HUD_OPS 7
|
||||
#define ANTAG_HUD_GANG_A 8
|
||||
#define ANTAG_HUD_GANG_B 9
|
||||
#define ANTAG_HUD_WIZ 10
|
||||
#define ANTAG_HUD_SHADOW 11
|
||||
|
||||
#define ANTAG_HUD_WIZ 8
|
||||
#define ANTAG_HUD_SHADOW 9
|
||||
|
||||
@@ -131,21 +131,6 @@ var/syndicate_name = null
|
||||
syndicate_name = name
|
||||
return name
|
||||
|
||||
var/gang_name_pool = list("Clandestine", "Prima", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Donk", "Gene", "Gib", "Tunnel", "Diablo", "Psyke", "Osiron", "Sleeping Carp")
|
||||
var/gang_A_name = null
|
||||
var/gang_B_name = null
|
||||
/proc/gang_name(var/gang)
|
||||
if(!gang_A_name || !gang_B_name)
|
||||
gang_A_name = pick(gang_name_pool)
|
||||
gang_name_pool -= gang_A_name
|
||||
gang_B_name = pick(gang_name_pool)
|
||||
gang_name_pool -= gang_B_name
|
||||
|
||||
if(gang == "A")
|
||||
return gang_A_name
|
||||
if(gang == "B")
|
||||
return gang_B_name
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
var/syndicate_code_phrase//Code phrase for traitors.
|
||||
|
||||
@@ -101,7 +101,7 @@ var/datum/subsystem/ticker/ticker
|
||||
if(!mode.explosion_in_progress && mode.check_finished() || force_ending)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
auto_toggle_ooc(1) // Turn it on
|
||||
declare_completion()
|
||||
declare_completion(force_ending)
|
||||
spawn(50)
|
||||
if(mode.station_was_nuked)
|
||||
world.Reboot("Station destroyed by Nuclear Device.", "end_proper", "nuke")
|
||||
@@ -407,7 +407,7 @@ var/datum/subsystem/ticker/ticker
|
||||
//calls auto_declare_completion_* for all modes
|
||||
for(var/handler in typesof(/datum/game_mode/proc))
|
||||
if (findtext("[handler]","auto_declare_completion_"))
|
||||
call(mode, handler)()
|
||||
call(mode, handler)(force_ending)
|
||||
|
||||
//Print a list of antagonists to the server log
|
||||
var/list/total_antagonists = list()
|
||||
|
||||
+4
-3
@@ -9,8 +9,6 @@ var/datum/atom_hud/huds = list( \
|
||||
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_GANG_A = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_GANG_B = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
|
||||
ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(), \
|
||||
)
|
||||
@@ -56,6 +54,9 @@ var/datum/atom_hud/huds = list( \
|
||||
|
||||
//MOB PROCS
|
||||
/mob/proc/reload_huds()
|
||||
for(var/datum/atom_hud/hud in huds)
|
||||
var/gang_huds = list()
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
gang_huds += G.ganghud
|
||||
for(var/datum/atom_hud/hud in (huds|gang_huds))
|
||||
if(src in hud.hudusers)
|
||||
hud.add_hud_to(src)
|
||||
|
||||
@@ -461,8 +461,8 @@
|
||||
return
|
||||
user << "<span class='notice'>You begin to read the scroll...</span>"
|
||||
user << "<span class='sciradio'><i>And all at once the secrets of the Sleeping Carp fill your mind. The ancient clan's martial teachings have been imbued into this scroll. As you read through it, \
|
||||
these secrets flood into your mind and body. You now know the martial techniques of the Sleeping Carp. Your hand-to-hand combat has become much more effective, and you may now perform powerful \
|
||||
combination attacks. To learn more about these combos, use the Recall Teachings ability in the Sleeping Carp tab.</i></span>"
|
||||
these secrets flood into your mind and body.<br>You now know the martial techniques of the Sleeping Carp. Your hand-to-hand combat has become much more effective, and you may now perform powerful \
|
||||
combination attacks.<br>To learn more about these combos, use the Recall Teachings ability in the Sleeping Carp tab.</i></span>"
|
||||
user.verbs += /mob/living/carbon/human/proc/sleeping_carp_help
|
||||
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
|
||||
theSleepingCarp.teach(user)
|
||||
|
||||
+95
-92
@@ -55,6 +55,7 @@
|
||||
var/miming = 0 // Mime's vow of silence
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
|
||||
var/datum/gang/gang_datum //Which gang this mind belongs to, if any
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
@@ -163,7 +164,7 @@
|
||||
|
||||
|
||||
/datum/mind/proc/remove_gang()
|
||||
ticker.mode.remove_gangster(src,0,1)
|
||||
ticker.mode.remove_gangster(src,0,1,1)
|
||||
remove_objectives()
|
||||
|
||||
/datum/mind/proc/remove_malf()
|
||||
@@ -223,10 +224,10 @@
|
||||
alert("Not before round-start!", "Alert")
|
||||
return
|
||||
|
||||
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
|
||||
var/out = ""
|
||||
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
|
||||
out += "Assigned role: [assigned_role]. <a href='?src=\ref[src];role_edit=1'>Edit</a><br>"
|
||||
out += "Factions and special roles:<br>"
|
||||
out += "Faction and special role: <b><font color='red'>[special_role]</font></b><br>"
|
||||
|
||||
var/list/sections = list(
|
||||
"revolution",
|
||||
@@ -250,7 +251,7 @@
|
||||
if (assigned_role in command_positions)
|
||||
text += "<b>HEAD</b>|loyal|employee|headrev|rev"
|
||||
else if (src in ticker.mode.head_revolutionaries)
|
||||
text = "head|loyal|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "head|loyal|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
@@ -285,46 +286,43 @@
|
||||
if (ticker.mode.config_tag=="gang")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.A_bosses)
|
||||
text += "loyal|<a href='?src=\ref[src];gang=clear'>none</a>|<B>(A)</B> <a href='?src=\ref[src];gang=agang'>gangster</a> <b>BOSS</b>|(B) <a href='?src=\ref[src];gang=bgang'>gangster</a> <a href='?src=\ref[src];gang=bboss'>boss</a>"
|
||||
text += "<br>Equipment: <a href='?src=\ref[src];gang=equip'>give</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/gangtool/gangtool = locate() in L
|
||||
if (gangtool)
|
||||
text += "|<a href='?src=\ref[src];gang=takeequip'>take</a>."
|
||||
else
|
||||
text += "."
|
||||
|
||||
else if (src in ticker.mode.B_bosses)
|
||||
text += "loyal|<a href='?src=\ref[src];gang=clear'>none</a>|(A) <a href='?src=\ref[src];gang=agang'>gangster</a> <a href='?src=\ref[src];gang=aboss'>boss</a>|<B>(B)</B> <a href='?src=\ref[src];gang=bgang'>gangster</a> <b>BOSS</b>"
|
||||
text += "<br>Equipment: <a href='?src=\ref[src];gang=equip'>give</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/gangtool/gangtool = locate() in L
|
||||
if (gangtool)
|
||||
text += "|<a href='?src=\ref[src];gang=takeequip'>take</a>."
|
||||
else
|
||||
text += "."
|
||||
|
||||
else if (src in ticker.mode.A_gang)
|
||||
text += "loyal|<a href='?src=\ref[src];gang=clear'>none</a>|<B>(A) GANGSTER</B> <a href='?src=\ref[src];gang=aboss'>boss</a>|(B) <a href='?src=\ref[src];gang=bgang'>gangster</a> <a href='?src=\ref[src];gang=bboss'>boss</a>"
|
||||
else if (src in ticker.mode.B_gang)
|
||||
text += "loyal|<a href='?src=\ref[src];gang=clear'>none</a>|(A) <a href='?src=\ref[src];gang=agang'>gangster</a> <a href='?src=\ref[src];gang=aboss'>boss</a>|<B>(B) GANGSTER</B> <a href='?src=\ref[src];gang=bboss'>boss</a>"
|
||||
else if(isloyal(current))
|
||||
text += "<B>LOYAL</B>|none|(A) <a href='?src=\ref[src];gang=agang'>gangster</a> <a href='?src=\ref[src];gang=aboss'>boss</a>|(B) <a href='?src=\ref[src];gang=bgang'>gangster</a> <a href='?src=\ref[src];gang=bboss'>boss</a>"
|
||||
text += "[isloyal(current) ? "<B>LOYAL</B>" : "loyal"]|"
|
||||
if(src in ticker.mode.get_all_gangsters())
|
||||
text += "<a href='?src=\ref[src];gang=clear'>none</a>"
|
||||
else
|
||||
text += "loyal|<B>NONE</B>|(A) <a href='?src=\ref[src];gang=agang'>gangster</a> <a href='?src=\ref[src];gang=aboss'>boss</a>|(B) <a href='?src=\ref[src];gang=bgang'>gangster</a> <a href='?src=\ref[src];gang=bboss'>boss</a>"
|
||||
|
||||
text += "<B>NONE</B>"
|
||||
|
||||
if(current && current.client && current.client.prefs.be_special & BE_GANG)
|
||||
text += "|Enabled in Prefs"
|
||||
text += "|Enabled in Prefs<BR>"
|
||||
else
|
||||
text += "|Disabled in Prefs"
|
||||
text += "|Disabled in Prefs<BR>"
|
||||
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
text += "<i>[G.name]</i>: "
|
||||
if(src in (G.gangsters))
|
||||
text += "<B>GANGSTER</B>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];gangster=\ref[G]'>gangster</a>"
|
||||
text += "|"
|
||||
if(src in (G.bosses))
|
||||
text += "<B>GANG LEADER</B>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];gangboss=\ref[G]'>gang leader</a>"
|
||||
text += "<BR>"
|
||||
|
||||
if(gang_colors_pool)
|
||||
text += "<a href='?src=\ref[src];gang=new'>Create New Gang</a>"
|
||||
|
||||
if(src in ticker.mode.get_gang_bosses())
|
||||
text += "<br>Equipment: <a href='?src=\ref[src];gang=equip'>give</a>"
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/gangtool/gangtool = locate() in L
|
||||
if (gangtool)
|
||||
text += "|<a href='?src=\ref[src];gang=takeequip'>take</a>"
|
||||
|
||||
sections["gang"] = text
|
||||
|
||||
|
||||
/** CULT ***/
|
||||
text = "cult"
|
||||
if (ticker.mode.config_tag=="cult")
|
||||
@@ -538,12 +536,12 @@
|
||||
if (sections["traitor"])
|
||||
out += sections["traitor"]+"<br>"
|
||||
if (sections["changeling"])
|
||||
out += sections["changeling"]+"<br>"
|
||||
out += sections["changeling"]+"<br><br>"
|
||||
sections -= "traitor"
|
||||
sections -= "changeling"
|
||||
else
|
||||
if (sections[ticker.mode.config_tag])
|
||||
out += sections[ticker.mode.config_tag]+"<br>"
|
||||
out += sections[ticker.mode.config_tag]+"<br><br>"
|
||||
sections -= ticker.mode.config_tag
|
||||
for (var/i in sections)
|
||||
if (sections[i])
|
||||
@@ -551,8 +549,6 @@
|
||||
|
||||
|
||||
if (((src in ticker.mode.head_revolutionaries) || \
|
||||
(src in ticker.mode.A_bosses) || \
|
||||
(src in ticker.mode.B_bosses) || \
|
||||
(src in ticker.mode.traitors) || \
|
||||
(src in ticker.mode.syndicates)) && \
|
||||
istype(current,/mob/living/carbon/human) )
|
||||
@@ -571,7 +567,7 @@
|
||||
text += "." //hiel grammar
|
||||
out += text
|
||||
|
||||
out += "<br>"
|
||||
out += "<br><br>"
|
||||
|
||||
out += "<b>Memory:</b><br>"
|
||||
out += memory
|
||||
@@ -588,7 +584,9 @@
|
||||
|
||||
out += "<a href='?src=\ref[src];obj_announce=1'>Announce objectives</a><br><br>"
|
||||
|
||||
usr << browse(out, "window=edit_memory[src];size=500x500")
|
||||
var/datum/browser/popup = new(usr, "edit_memory[src]", "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]", 500, 600)
|
||||
popup.set_content(out)
|
||||
popup.open()
|
||||
|
||||
/datum/mind/Topic(href, href_list)
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
@@ -823,6 +821,10 @@
|
||||
else
|
||||
flash.broken = 0
|
||||
|
||||
|
||||
|
||||
//////////////////// GANG MODE
|
||||
|
||||
else if (href_list["gang"])
|
||||
switch(href_list["gang"])
|
||||
if("clear")
|
||||
@@ -830,48 +832,6 @@
|
||||
message_admins("[key_name_admin(usr)] has de-gang'ed [current].")
|
||||
log_admin("[key_name(usr)] has de-gang'ed [current].")
|
||||
|
||||
if("agang")
|
||||
if(src in ticker.mode.A_gang)
|
||||
return
|
||||
ticker.mode.remove_gangster(src, 0, 2)
|
||||
ticker.mode.add_gangster(src,"A",0)
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [gang_name("A")] Gang (A).")
|
||||
log_admin("[key_name(usr)] has added [current] to the [gang_name("A")] Gang (A).")
|
||||
|
||||
if("aboss")
|
||||
if(src in ticker.mode.A_bosses)
|
||||
return
|
||||
ticker.mode.remove_gangster(src, 0, 2)
|
||||
ticker.mode.A_bosses += src
|
||||
src.special_role = "[gang_name("A")] Gang (A) Boss"
|
||||
ticker.mode.update_gang_icons_added(src, "A")
|
||||
current << "<FONT size=3 color=red><B>You are a [gang_name("A")] Gang Boss!</B></FONT>"
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [gang_name("A")] Gang (A) leadership.")
|
||||
log_admin("[key_name(usr)] has added [current] to the [gang_name("A")] Gang (A) leadership.")
|
||||
ticker.mode.forge_gang_objectives(src)
|
||||
ticker.mode.greet_gang(src,0)
|
||||
|
||||
if("bgang")
|
||||
if(src in ticker.mode.B_gang)
|
||||
return
|
||||
ticker.mode.remove_gangster(src, 0, 2)
|
||||
ticker.mode.add_gangster(src,"B",0)
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [gang_name("B")] Gang (B).")
|
||||
log_admin("[key_name(usr)] has added [current] to the [gang_name("B")] Gang (B).")
|
||||
|
||||
if("bboss")
|
||||
if(src in ticker.mode.B_bosses)
|
||||
return
|
||||
ticker.mode.remove_gangster(src, 0, 2)
|
||||
ticker.mode.B_bosses += src
|
||||
src.special_role = "[gang_name("B")] Gang (B) Boss"
|
||||
ticker.mode.update_gang_icons_added(src, "B")
|
||||
current << "<FONT size=3 color=red><B>You are a [gang_name("B")] Gang Boss!</B></FONT>"
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [gang_name("B")] Gang (B) leadership.")
|
||||
log_admin("[key_name(usr)] has added [current] to the [gang_name("B")] Gang (B) leadership.")
|
||||
ticker.mode.forge_gang_objectives(src)
|
||||
ticker.mode.greet_gang(src,0)
|
||||
|
||||
if("equip")
|
||||
switch(ticker.mode.equip_gang(current))
|
||||
if(1)
|
||||
@@ -890,6 +850,51 @@
|
||||
for(var/obj/item/toy/crayon/spraycan/gang/SC in L)
|
||||
qdel(SC)
|
||||
|
||||
if("new")
|
||||
if(gang_colors_pool.len)
|
||||
var/list/names = list("Random") + gang_name_pool
|
||||
var/list/colors = list("Random") + gang_colors_pool
|
||||
var/gangname = input("Pick a gang name.","Select Name") as null|anything in names
|
||||
if(gangname)
|
||||
var/gangcolor = input("Pick a gang color.","Select Color") as null|anything in colors
|
||||
if(gangcolor && gang_colors_pool.len) //Check again just in case another admin made max gangs at the same time
|
||||
if(!(gangname in gang_name_pool))
|
||||
gangname = null
|
||||
if(!(gangcolor in gang_colors_pool))
|
||||
gangcolor = null
|
||||
var/datum/gang/newgang = new(null,gangname,gangcolor)
|
||||
ticker.mode.gangs += newgang
|
||||
message_admins("[key_name_admin(usr)] has created the [newgang.name] Gang[gangcolor ? " with the color [gangcolor]" : ""].")
|
||||
log_admin("[key_name(usr)] has created the [newgang.name] Gang[gangcolor ? " with the color [gangcolor]" : ""].")
|
||||
|
||||
else if (href_list["gangboss"])
|
||||
var/datum/gang/G = locate(href_list["gangboss"]) in ticker.mode.gangs
|
||||
if(!G || (src in G.bosses))
|
||||
return
|
||||
ticker.mode.remove_gangster(src,0,2,1)
|
||||
G.bosses += src
|
||||
gang_datum = G
|
||||
special_role = "[G.name] Gang Boss"
|
||||
G.add_gang_hud(src)
|
||||
current << "<FONT size=3 color=red><B>You are a [G.name] Gang Boss!</B></FONT>"
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [G.name] Gang leadership.")
|
||||
log_admin("[key_name(usr)] has added [current] to the [G.name] Gang leadership.")
|
||||
ticker.mode.forge_gang_objectives(src)
|
||||
ticker.mode.greet_gang(src,0)
|
||||
|
||||
else if (href_list["gangster"])
|
||||
var/datum/gang/G = locate(href_list["gangster"]) in ticker.mode.gangs
|
||||
if(!G || (src in G.gangsters))
|
||||
return
|
||||
ticker.mode.remove_gangster(src,0,2,1)
|
||||
ticker.mode.add_gangster(src,G,0)
|
||||
message_admins("[key_name_admin(usr)] has added [current] to the [G.name] Gang (A).")
|
||||
log_admin("[key_name(usr)] has added [current] to the [G.name] Gang (A).")
|
||||
|
||||
/////////////////////////////////
|
||||
|
||||
|
||||
|
||||
else if (href_list["cult"])
|
||||
switch(href_list["cult"])
|
||||
if("clear")
|
||||
@@ -1213,6 +1218,7 @@
|
||||
if (!isnull(crystals))
|
||||
if (suplink)
|
||||
suplink.uses = crystals
|
||||
message_admins("[key_name_admin(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||
log_admin("[key_name(usr)] changed [current]'s telecrystal count to [crystals].")
|
||||
if("uplink")
|
||||
if (!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
|
||||
@@ -1386,14 +1392,11 @@
|
||||
fail |= !ticker.mode.equip_revolutionary(current)
|
||||
|
||||
|
||||
/datum/mind/proc/make_Gang(var/gang)
|
||||
special_role = "[gang_name(gang)] Gang ([gang]) Boss"
|
||||
if(gang=="A")
|
||||
ticker.mode.A_bosses += src
|
||||
else if(gang=="B")
|
||||
ticker.mode.B_bosses += src
|
||||
ticker.mode.update_gang_icons_added(src, gang)
|
||||
ticker.mode.forge_gang_objectives(src, gang)
|
||||
/datum/mind/proc/make_Gang(var/datum/gang/G)
|
||||
special_role = "[G.name] Gang Boss"
|
||||
G.bosses += src
|
||||
G.add_gang_hud(src)
|
||||
ticker.mode.forge_gang_objectives(src)
|
||||
ticker.mode.greet_gang(src)
|
||||
ticker.mode.equip_gang(current)
|
||||
|
||||
|
||||
@@ -8,13 +8,11 @@
|
||||
layer = 3.6
|
||||
var/maxhealth = 200
|
||||
var/health = 200
|
||||
var/gang
|
||||
var/datum/gang/gang
|
||||
var/operating = 0
|
||||
|
||||
/obj/machinery/dominator/New()
|
||||
if(!istype(ticker.mode, /datum/game_mode/gang))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
SetLuminosity(2)
|
||||
|
||||
/obj/machinery/dominator/examine(mob/user)
|
||||
@@ -23,15 +21,9 @@
|
||||
user << "<span class='danger'>It looks completely busted.</span>"
|
||||
return
|
||||
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
var/time = null
|
||||
if(gang == "A")
|
||||
if(isnum(mode.A_timer))
|
||||
time = max(mode.A_timer, 0)
|
||||
if(gang == "B")
|
||||
if(isnum(mode.B_timer))
|
||||
time = max(mode.B_timer, 0)
|
||||
if(isnum(time))
|
||||
var/time
|
||||
if(gang && isnum(gang.dom_timer))
|
||||
time = max(gang.dom_timer, 0)
|
||||
if(time > 0)
|
||||
user << "<span class='notice'>Hostile Takeover in progress. Estimated [time] seconds remain.</span>"
|
||||
else
|
||||
@@ -41,14 +33,17 @@
|
||||
user << "<span class='danger'>System Integrity: [round((health/maxhealth)*100,1)]%</span>"
|
||||
|
||||
/obj/machinery/dominator/process()
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
if(((gang == "A") && mode.A_timer) || ((gang == "B") && mode.B_timer))
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
..()
|
||||
if(gang && isnum(gang.dom_timer))
|
||||
if(gang.dom_timer > 0)
|
||||
playsound(loc, 'sound/items/timer.ogg', 30, 0)
|
||||
else
|
||||
SSmachine.processing -= src
|
||||
|
||||
/obj/machinery/dominator/proc/healthcheck(var/damage)
|
||||
var/iconname = "dominator"
|
||||
if(gang)
|
||||
iconname += "-[gang]"
|
||||
iconname += "-[gang.color]"
|
||||
SetLuminosity(3)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread
|
||||
@@ -59,10 +54,10 @@
|
||||
if(prob(damage*2))
|
||||
sparks.set_up(5, 1, src)
|
||||
sparks.start()
|
||||
else
|
||||
else if(operating >= 0)
|
||||
sparks.set_up(5, 1, src)
|
||||
sparks.start()
|
||||
iconname += "-damaged"
|
||||
overlays += "damage"
|
||||
|
||||
if(operating != -1)
|
||||
if(health <= 0)
|
||||
@@ -75,13 +70,15 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/dominator/proc/set_broken()
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
if(gang == "A")
|
||||
mode.A_timer = "OFFLINE"
|
||||
if(gang == "B")
|
||||
mode.B_timer = "OFFLINE"
|
||||
if(gang)
|
||||
if(!isnum(mode.A_timer) && !isnum(mode.B_timer))
|
||||
gang.dom_timer = "OFFLINE"
|
||||
|
||||
var/takeover_in_progress = 0
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
if(isnum(G.dom_timer))
|
||||
takeover_in_progress = 1
|
||||
break
|
||||
if(!takeover_in_progress)
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
@@ -93,10 +90,11 @@
|
||||
if(get_security_level() == "delta")
|
||||
set_security_level("red")
|
||||
|
||||
ticker.mode.message_gangtools(((gang=="A") ? ticker.mode.A_tools : ticker.mode.B_tools),"Hostile takeover cancelled: Dominator is no longer operational.",1,1)
|
||||
gang.message_gangtools("Hostile takeover cancelled: Dominator is no longer operational.",1,1)
|
||||
|
||||
SetLuminosity(0)
|
||||
icon_state = "dominator-broken"
|
||||
overlays.Cut()
|
||||
operating = -1
|
||||
SSmachine.processing -= src
|
||||
|
||||
@@ -145,46 +143,33 @@
|
||||
examine(user)
|
||||
return
|
||||
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
var/gang_territory
|
||||
var/timer
|
||||
var/datum/gang/tempgang
|
||||
|
||||
var/tempgang
|
||||
if(user.mind in (ticker.mode.A_gang|ticker.mode.A_bosses))
|
||||
tempgang = "A"
|
||||
gang_territory = ticker.mode.A_territory.len
|
||||
timer = mode.A_timer
|
||||
else if(user.mind in (ticker.mode.B_gang|ticker.mode.B_bosses))
|
||||
tempgang = "B"
|
||||
gang_territory = ticker.mode.B_territory.len
|
||||
timer = mode.B_timer
|
||||
|
||||
if(!tempgang)
|
||||
if(user.mind in ticker.mode.get_all_gangsters())
|
||||
tempgang = user.mind.gang_datum
|
||||
else
|
||||
examine(user)
|
||||
return
|
||||
|
||||
if(isnum(timer))
|
||||
if(isnum(tempgang.dom_timer))
|
||||
user << "<span class='warning'>Error: Hostile Takeover is already in progress.</span>"
|
||||
return
|
||||
|
||||
if(tempgang == "A" ? !mode.A_dominations : !mode.B_dominations)
|
||||
if(!tempgang.dom_attempts)
|
||||
user << "<span class='warning'>Error: Unable to breach station network. Firewall has logged our signature and is blocking all further attempts.</span>"
|
||||
return
|
||||
|
||||
var/time = max(300,900 - ((round((gang_territory/start_state.num_territories)*200, 1) - 60) * 15))
|
||||
if(alert(user,"With [round((gang_territory/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] seconds.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang == "A" ? mode.A_dominations : mode.B_dominations] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready")
|
||||
var/time = max(300,900 - ((round((tempgang.territory.len/start_state.num_territories)*200, 1) - 60) * 15))
|
||||
if(alert(user,"With [round((tempgang.territory.len/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] seconds.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready")
|
||||
if ((!in_range(src, user) || !istype(src.loc, /turf)))
|
||||
return 0
|
||||
gang = tempgang
|
||||
if(gang == "A")
|
||||
mode.A_dominations --
|
||||
else
|
||||
mode.B_dominations --
|
||||
mode.domination(gang,1,src)
|
||||
src.name = "[gang_name(gang)] Gang [src.name]"
|
||||
gang.dom_attempts --
|
||||
gang.domination(1,src)
|
||||
src.name = "[gang.name] Gang [src.name]"
|
||||
healthcheck(0)
|
||||
operating = 1
|
||||
ticker.mode.message_gangtools(((gang=="A") ? ticker.mode.A_tools : ticker.mode.B_tools),"Hostile takeover in progress: Estimated [time] seconds until victory.")
|
||||
gang.message_gangtools("Hostile takeover in progress: Estimated [time] seconds until victory.")
|
||||
SSmachine.processing += src
|
||||
|
||||
/obj/machinery/dominator/attack_alien(mob/living/user)
|
||||
|
||||
+113
-448
@@ -1,41 +1,24 @@
|
||||
//gang.dm
|
||||
//Gang War Game Mode
|
||||
|
||||
var/list/gang_name_pool = list("Clandestine", "Prima", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Donk", "Gene", "Gib", "Tunnel", "Diablo", "Psyke", "Osiron", "Sleeping Carp")
|
||||
var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple")
|
||||
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/A_gang = list() //gang A Members
|
||||
var/list/datum/mind/B_gang = list() //gang B Members
|
||||
var/list/datum/mind/A_bosses = list() //gang A Bosses
|
||||
var/list/datum/mind/B_bosses = list() //gang B Bosses
|
||||
var/obj/item/device/gangtool/A_tools = list()
|
||||
var/obj/item/device/gangtool/B_tools = list()
|
||||
var/list/datum/gang/gangs = list()
|
||||
var/datum/gang_points/gang_points
|
||||
var/A_style
|
||||
var/B_style
|
||||
var/A_fighting_style
|
||||
var/B_fighting_style
|
||||
var/list/A_territory = list()
|
||||
var/list/B_territory = list()
|
||||
var/list/A_territory_new = list()
|
||||
var/list/A_territory_lost = list()
|
||||
var/list/B_territory_new = list()
|
||||
var/list/B_territory_lost = list()
|
||||
|
||||
|
||||
/datum/game_mode/gang
|
||||
name = "gang war"
|
||||
config_tag = "gang"
|
||||
antag_flag = BE_GANG
|
||||
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
required_players = 20
|
||||
required_players = 2
|
||||
required_enemies = 2
|
||||
recommended_enemies = 2
|
||||
enemy_minimum_age = 14
|
||||
var/finished = 0
|
||||
// Victory timers
|
||||
var/A_timer = "OFFLINE"
|
||||
var/B_timer = "OFFLINE"
|
||||
//How many attempts at domination each team is allowed
|
||||
var/A_dominations = 3
|
||||
var/B_dominations = 3
|
||||
|
||||
///////////////////////////
|
||||
//Announces the game type//
|
||||
///////////////////////////
|
||||
@@ -55,13 +38,28 @@
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
//Spawn more bosses depending on server population
|
||||
assign_bosses(1)
|
||||
if(num_players() >= 30) //30
|
||||
assign_bosses()
|
||||
if(num_players() >= 40) //40
|
||||
assign_bosses()
|
||||
var/gangs_to_create = 2
|
||||
if(num_players() >= 6)
|
||||
gangs_to_create ++
|
||||
|
||||
if(!A_bosses.len || !B_bosses.len)
|
||||
for(var/i=1 to gangs_to_create)
|
||||
if(!antag_candidates.len)
|
||||
break
|
||||
|
||||
//Create the gang
|
||||
var/datum/gang/G = new()
|
||||
gangs += G
|
||||
|
||||
//Now assign a boss for the gang
|
||||
var/datum/mind/boss = pick(antag_candidates)
|
||||
antag_candidates -= boss
|
||||
G.bosses += boss
|
||||
boss.gang_datum = G
|
||||
boss.special_role = "[G.name] Gang Boss"
|
||||
boss.restricted_roles = restricted_jobs
|
||||
log_game("[boss.key] has been selected as the Boss for the [G.name] Gang")
|
||||
|
||||
if(gangs.len < 2) //Need at least two gangs
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -69,89 +67,30 @@
|
||||
|
||||
/datum/game_mode/gang/post_setup()
|
||||
spawn(rand(10,100))
|
||||
for(var/datum/mind/boss_mind in A_bosses)
|
||||
update_gang_icons_added(boss_mind, "A")
|
||||
forge_gang_objectives(boss_mind, "A")
|
||||
greet_gang(boss_mind)
|
||||
equip_gang(boss_mind.current)
|
||||
|
||||
for(var/datum/mind/boss_mind in B_bosses)
|
||||
update_gang_icons_added(boss_mind, "B")
|
||||
forge_gang_objectives(boss_mind, "B")
|
||||
greet_gang(boss_mind)
|
||||
equip_gang(boss_mind.current)
|
||||
|
||||
modePlayer += A_bosses
|
||||
modePlayer += B_bosses
|
||||
assign_gang_fighting_style()
|
||||
for(var/datum/gang/G in gangs)
|
||||
for(var/datum/mind/boss_mind in G.bosses)
|
||||
G.add_gang_hud(boss_mind)
|
||||
forge_gang_objectives(boss_mind)
|
||||
greet_gang(boss_mind)
|
||||
equip_gang(boss_mind.current)
|
||||
modePlayer += boss_mind
|
||||
..()
|
||||
|
||||
/datum/game_mode/gang/process(seconds)
|
||||
if(!finished)
|
||||
if(isnum(A_timer))
|
||||
A_timer -= seconds
|
||||
if(isnum(B_timer))
|
||||
B_timer -= seconds
|
||||
|
||||
check_win()
|
||||
|
||||
/datum/game_mode/gang/proc/assign_bosses(var/leader)
|
||||
if(antag_candidates.len < 2) //Not enough bosses
|
||||
return
|
||||
|
||||
var/datum/mind/boss = pick(antag_candidates)
|
||||
A_bosses += boss
|
||||
antag_candidates -= boss
|
||||
boss.special_role = "[gang_name("A")] Gang (A) [leader ? "Boss" : "Lieutenant"]"
|
||||
boss.restricted_roles = restricted_jobs
|
||||
log_game("[boss.key] has been selected as a [leader ? "Boss" : "Lieutenant"] for the [gang_name("A")] Gang (A)")
|
||||
|
||||
boss = pick(antag_candidates)
|
||||
B_bosses += boss
|
||||
antag_candidates -= boss
|
||||
boss.special_role = "[gang_name("B")] Gang (B) [leader ? "Boss" : "Lieutenant"]"
|
||||
boss.restricted_roles = restricted_jobs
|
||||
log_game("[boss.key] has been selected as a [leader ? "Boss" : "Lieutenant"] for the [gang_name("B")] Gang (B)")
|
||||
|
||||
/datum/game_mode/proc/forge_gang_objectives(var/datum/mind/boss_mind)
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
var/datum/objective/rival_obj = new
|
||||
rival_obj.owner = boss_mind
|
||||
rival_obj.explanation_text = "Preform a hostile takeover of the station with a Dominator."
|
||||
boss_mind.objectives += rival_obj
|
||||
|
||||
/datum/game_mode/proc/assign_gang_fighting_style()
|
||||
var/aName = gang_name("A")
|
||||
if(aName == "Sleeping Carp")
|
||||
A_fighting_style = "martial"
|
||||
else
|
||||
A_fighting_style = "normal"
|
||||
var/bName = gang_name("B")
|
||||
if(bName == "Sleeping Carp")
|
||||
B_fighting_style = "martial"
|
||||
else
|
||||
B_fighting_style = "normal"
|
||||
var/datum/objective/rival_obj = new
|
||||
rival_obj.owner = boss_mind
|
||||
rival_obj.explanation_text = "Be the first gang to successfully takeover the station with a Dominator."
|
||||
boss_mind.objectives += rival_obj
|
||||
|
||||
/datum/game_mode/proc/greet_gang(var/datum/mind/boss_mind, var/you_are=1)
|
||||
var/obj_count = 1
|
||||
var/isboss = (boss_mind==A_bosses[1] || boss_mind==B_bosses[1])
|
||||
if (you_are)
|
||||
boss_mind.current << "<FONT size=3 color=red><B>You are [isboss ? "the Boss of" : "a Lieutenant in"] the [(boss_mind in A_bosses) ? gang_name("A") : gang_name("B")] Gang!</B></FONT>"
|
||||
boss_mind.current << "<FONT size=3 color=red><B>You are the Boss of the [boss_mind.gang_datum.name] Gang!</B></FONT>"
|
||||
for(var/datum/objective/objective in boss_mind.objectives)
|
||||
boss_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
/datum/game_mode/gang/proc/domination(var/gang,var/modifier=1,var/obj/dominator)
|
||||
if(gang=="A")
|
||||
A_timer = max(300,900 - ((round((A_territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier
|
||||
if(gang=="B")
|
||||
B_timer = max(300,900 - ((round((B_territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier
|
||||
if(gang && dominator)
|
||||
var/area/domloc = get_area(dominator.loc)
|
||||
priority_announce("Network breach detected in [initial(domloc.name)]. The [gang_name(gang)] Gang is attempting to seize control of the station!","Network Alert")
|
||||
set_security_level("delta")
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//This equips the bosses with their gear, and makes the clown not clumsy//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -159,21 +98,16 @@
|
||||
if(!istype(mob))
|
||||
return
|
||||
|
||||
var/isboss
|
||||
if (mob.mind)
|
||||
isboss = (mob.mind==A_bosses[1] || mob.mind==B_bosses[1])
|
||||
if (mob.mind.assigned_role == "Clown")
|
||||
mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
|
||||
mob.dna.remove_mutation(CLOWNMUT)
|
||||
|
||||
var/obj/item/device/gangtool/gangtool
|
||||
if(isboss)
|
||||
gangtool = new(mob)
|
||||
else
|
||||
var/obj/item/device/gangtool/lt/lt_tool = new(mob)
|
||||
gangtool = lt_tool
|
||||
var/obj/item/device/gangtool/gangtool = new(mob)
|
||||
var/obj/item/weapon/pen/gang/T = new(mob)
|
||||
var/obj/item/toy/crayon/spraycan/gang/SC = new(mob)
|
||||
SC.colour = mob.mind.gang_datum.color_hex
|
||||
SC.update_icon()
|
||||
|
||||
var/list/slots = list (
|
||||
"backpack" = slot_in_backpack,
|
||||
@@ -211,243 +145,105 @@
|
||||
return .
|
||||
|
||||
|
||||
//Used by recallers when purchasing a gang outfit. First time a gang outfit is purchased the buyer decides a gang style which is stored so gang outfits are uniform
|
||||
/datum/game_mode/proc/gang_outfit(mob/living/carbon/user,var/obj/item/device/gangtool/gangtool,var/gang)
|
||||
if(!user || !gangtool || !gang)
|
||||
return 0
|
||||
if(!gangtool.can_use(user))
|
||||
return 0
|
||||
|
||||
var/gang_style_list = list("Gang Colored Jumpsuits","Gang Colored Suits","Black Suits","White Suits","Leather Jackets","Leather Overcoats","Puffer Jackets","Tactical Turtlenecks","Soviet Uniforms")
|
||||
var/style
|
||||
if(gang == "A")
|
||||
if(!A_style)
|
||||
if(gangtool.outfits >=3) //Gives the gang boss a few minutes to pick a style first before someone else gets to
|
||||
A_style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
|
||||
else
|
||||
user << "<span class='warning'>Your gang boss hasn't picked a style yet!</span>"
|
||||
style = A_style
|
||||
|
||||
if(gang == "B")
|
||||
if(!B_style)
|
||||
if(gangtool.outfits >=3) //Gives the gang boss a few minutes to pick a style first before someone else gets to
|
||||
B_style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
|
||||
else
|
||||
user << "<span class='warning'>Your gang boss hasn't picked a style yet!</span>"
|
||||
style = B_style
|
||||
|
||||
if(!style)
|
||||
return 0
|
||||
|
||||
if(gangtool.can_use(user) && (((gang == "A") ? gang_points.A : gang_points.B) >= 1))
|
||||
var/outfit_path
|
||||
switch(style)
|
||||
if("Gang Colored Jumpsuits")
|
||||
if(gang == "A")
|
||||
outfit_path = /obj/item/clothing/under/color/blue
|
||||
if(gang == "B")
|
||||
outfit_path = /obj/item/clothing/under/color/red
|
||||
if("Gang Colored Suits")
|
||||
if(gang == "A")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/navy
|
||||
if(gang == "B")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/burgundy
|
||||
if("Black Suits")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/charcoal
|
||||
if("White Suits")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/white
|
||||
if("Puffer Jackets")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/puffer
|
||||
if("Leather Jackets")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/leather
|
||||
if("Leather Overcoats")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/leather/overcoat
|
||||
if("Soviet Uniforms")
|
||||
outfit_path = /obj/item/clothing/under/soviet
|
||||
if("Tactical Turtlenecks")
|
||||
outfit_path = /obj/item/clothing/under/syndicate
|
||||
|
||||
if(outfit_path)
|
||||
var/obj/item/clothing/outfit = new outfit_path(user.loc)
|
||||
outfit.armor = list(melee = 20, bullet = 30, laser = 10, energy = 10, bomb = 20, bio = 0, rad = 0)
|
||||
outfit.desc += " Tailored for the [gang_name(gang)] Gang to offer the wearer moderate protection against ballistics and physical trauma."
|
||||
outfit.gang = gang
|
||||
user.put_in_any_hand_if_possible(outfit)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//Checks if the either gang have won or not//
|
||||
/////////////////////////////////////////////
|
||||
/datum/game_mode/gang/check_win()
|
||||
var/winner = 0
|
||||
|
||||
if(isnum(A_timer))
|
||||
if(A_timer < 0)
|
||||
winner += 1
|
||||
if(isnum(B_timer))
|
||||
if(B_timer < 0)
|
||||
winner += 2
|
||||
|
||||
if(winner)
|
||||
if(winner == 3) //Edge Case: If both dominators activate at the same time
|
||||
domination("A",0.5)
|
||||
domination("B",0.5)
|
||||
priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting hostile runtimes appears to have delayed both attempts.","Network Alert")
|
||||
else if(winner == 1)
|
||||
finished = "A" //Gang A wins
|
||||
else if(winner == 2)
|
||||
finished = "B" //Gang B wins
|
||||
|
||||
///////////////////////////////
|
||||
//Checks if the round is over//
|
||||
///////////////////////////////
|
||||
/datum/game_mode/gang/check_finished()
|
||||
if(finished)
|
||||
return 1
|
||||
return ..() //Check for evacuation/nuke
|
||||
|
||||
///////////////////////////////////////////
|
||||
//Deals with converting players to a gang//
|
||||
///////////////////////////////////////////
|
||||
/datum/game_mode/proc/add_gangster(datum/mind/gangster_mind, var/gang, var/check = 1)
|
||||
if(gangster_mind in (A_bosses | A_gang | B_bosses | B_gang))
|
||||
/datum/game_mode/proc/add_gangster(datum/mind/gangster_mind, var/datum/gang/G, var/check = 1)
|
||||
if(!G || (gangster_mind in get_all_gangsters()))
|
||||
return 0
|
||||
if(check && isloyal(gangster_mind.current)) //Check to see if the potential gangster is implanted
|
||||
return 1
|
||||
if(gang == "A")
|
||||
A_gang += gangster_mind
|
||||
else
|
||||
B_gang += gangster_mind
|
||||
G.gangsters += gangster_mind
|
||||
gangster_mind.gang_datum = G
|
||||
if(check)
|
||||
if(iscarbon(gangster_mind.current))
|
||||
var/mob/living/carbon/carbon_mob = gangster_mind.current
|
||||
carbon_mob.silent = max(carbon_mob.silent, 5)
|
||||
carbon_mob.flash_eyes(1, 1)
|
||||
gangster_mind.current.Stun(5)
|
||||
gangster_mind.current << "<FONT size=3 color=red><B>You are now a member of the [gang_name(gang)] Gang!</B></FONT>"
|
||||
gangster_mind.current << "<FONT size=3 color=red><B>You are now a member of the [G.name] Gang!</B></FONT>"
|
||||
gangster_mind.current << "<font color='red'>Help your bosses take over the station by claiming territory with <b>special spraycans</b> only they can provide. Simply spray on any unclaimed area of the station.</font>"
|
||||
gangster_mind.current << "<font color='red'>You can identify your bosses by their <b>red \[G\] icon</b>.</font>"
|
||||
gangster_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been converted to the [gang_name(gang)] Gang ([gang])!</font>"
|
||||
gangster_mind.special_role = "[gang_name(gang)] Gang ([gang])"
|
||||
update_gang_icons_added(gangster_mind,gang)
|
||||
gangster_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has been converted to the [G.name] Gang!</font>"
|
||||
gangster_mind.special_role = "[G.name] Gangster"
|
||||
G.add_gang_hud(gangster_mind)
|
||||
return 2
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//Deals with players reverting to neutral (Not a gangster anymore)//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/datum/game_mode/proc/remove_gangster(datum/mind/gangster_mind, var/beingborged, var/silent, var/exclude_bosses=0)
|
||||
var/gang
|
||||
|
||||
if(!exclude_bosses)
|
||||
if(gangster_mind in A_bosses)
|
||||
A_bosses -= gangster_mind
|
||||
gang = "A"
|
||||
|
||||
if(gangster_mind in B_bosses)
|
||||
B_bosses -= gangster_mind
|
||||
gang = "B"
|
||||
|
||||
if(gangster_mind in A_gang)
|
||||
A_gang -= gangster_mind
|
||||
gang = "A"
|
||||
|
||||
if(gangster_mind in B_gang)
|
||||
B_gang -= gangster_mind
|
||||
gang = "B"
|
||||
|
||||
if(!gang) //not a valid gangster
|
||||
/datum/game_mode/proc/remove_gangster(datum/mind/gangster_mind, var/beingborged, var/silent, var/remove_bosses=0)
|
||||
var/datum/gang/gang = gangster_mind.gang_datum
|
||||
if(!gang)
|
||||
return
|
||||
|
||||
for(var/datum/gang/G in gangs)
|
||||
G.gangsters -= gangster_mind
|
||||
if(remove_bosses)
|
||||
G.bosses -= gangster_mind
|
||||
|
||||
gangster_mind.special_role = null
|
||||
gangster_mind.gang_datum = null
|
||||
|
||||
if(silent < 2)
|
||||
gangster_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has reformed and defected from the [gang_name(gang)] Gang ([gang])!</font>"
|
||||
gangster_mind.current.attack_log += "\[[time_stamp()]\] <font color='red'>Has reformed and defected from the [gang.name] Gang!</font>"
|
||||
|
||||
if(beingborged)
|
||||
if(!silent)
|
||||
gangster_mind.current.visible_message("The frame beeps contentedly from the MMI before initalizing it.")
|
||||
gangster_mind.current << "<FONT size=3 color=red><B>The frame's firmware detects and deletes your criminal behavior! You are no longer a gangster!</B></FONT>"
|
||||
message_admins("[key_name_admin(gangster_mind.current)] <A HREF='?_src_=holder;adminmoreinfo=\ref[gangster_mind.current]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[gangster_mind.current]'>FLW</A>) has been borged while being a member of the [gang_name(gang)] Gang ([gang]). They are no longer a gangster.")
|
||||
message_admins("[key_name_admin(gangster_mind.current)] <A HREF='?_src_=holder;adminmoreinfo=\ref[gangster_mind.current]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[gangster_mind.current]'>FLW</A>) has been borged while being a member of the [gang.name] Gang. They are no longer a gangster.")
|
||||
else
|
||||
if(!silent)
|
||||
gangster_mind.current.Paralyse(5)
|
||||
gangster_mind.current.visible_message("<FONT size=3><B>[gangster_mind.current] looks like they've given up the life of crime!<B></font>")
|
||||
gangster_mind.current << "<FONT size=3 color=red><B>You have been reformed! You are no longer a gangster!</B><BR>You try as hard as you can, but you can't seem to recall any of the identities of your former gangsters...</FONT>"
|
||||
|
||||
update_gang_icons_removed(gangster_mind, gang)
|
||||
gang.remove_gang_hud(gangster_mind)
|
||||
|
||||
///////////////////////
|
||||
//Add/remove gang HUD//
|
||||
///////////////////////
|
||||
/datum/game_mode/proc/get_gang_hud(var/gang)
|
||||
var/datum/atom_hud/antag/ganghud = null
|
||||
switch(gang)
|
||||
if("A") ganghud = huds[ANTAG_HUD_GANG_A]
|
||||
if("B") ganghud = huds[ANTAG_HUD_GANG_B]
|
||||
return ganghud
|
||||
////////////////
|
||||
//Helper Procs//
|
||||
////////////////
|
||||
|
||||
/datum/game_mode/proc/get_gang_bosses(var/gang)
|
||||
var/bosses = null
|
||||
switch(gang)
|
||||
if("A") bosses = A_bosses
|
||||
if("B") bosses = B_bosses
|
||||
return bosses
|
||||
/datum/game_mode/proc/get_all_gangsters()
|
||||
var/list/all_gangsters = list()
|
||||
all_gangsters += get_gangsters()
|
||||
all_gangsters += get_gang_bosses()
|
||||
return all_gangsters
|
||||
|
||||
/datum/game_mode/proc/update_gang_icons_added(datum/mind/recruit_mind, var/gang)
|
||||
var/datum/atom_hud/antag/ganghud = get_gang_hud(gang)
|
||||
var/bosses = get_gang_bosses(gang)
|
||||
if(!ganghud)
|
||||
ERROR("Invalid gang in update_gang_icons_added(): [gang]")
|
||||
/datum/game_mode/proc/get_gangsters()
|
||||
var/list/gangsters = list()
|
||||
for(var/datum/gang/G in gangs)
|
||||
gangsters += G.gangsters
|
||||
return gangsters
|
||||
|
||||
ganghud.join_hud(recruit_mind.current)
|
||||
set_antag_hud(recruit_mind.current, ((recruit_mind in bosses) ? "gang_boss" : "gangster"))
|
||||
|
||||
/datum/game_mode/proc/update_gang_icons_removed(datum/mind/defector_mind, var/gang)
|
||||
var/datum/atom_hud/antag/ganghud = get_gang_hud(gang)
|
||||
if(!ganghud)
|
||||
ERROR("Invalid gang in update_gang_icons_removed(): [gang]")
|
||||
|
||||
ganghud.leave_hud(defector_mind.current)
|
||||
set_antag_hud(defector_mind.current, null)
|
||||
/datum/game_mode/proc/get_gang_bosses()
|
||||
var/list/gang_bosses = list()
|
||||
for(var/datum/gang/G in gangs)
|
||||
gang_bosses += G.bosses
|
||||
return gang_bosses
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//Announces the end of the game with all relavent information stated//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/datum/game_mode/gang/declare_completion()
|
||||
if(!finished)
|
||||
/datum/game_mode/gang/declare_completion(datum/gang/winner)
|
||||
if(!winner)
|
||||
world << "<FONT size=3 color=red><B>The station was [station_was_nuked ? "destroyed!" : "evacuated before either gang could claim it!"]</B></FONT>"
|
||||
else
|
||||
world << "<FONT size=3 color=red><B>The [get_gang_bosses(finished)] Gang successfully performed a hostile takeover of the station!!</B></FONT>"
|
||||
world << "<FONT size=3 color=red><B>The [winner.name] Gang successfully performed a hostile takeover of the station!!</B></FONT>"
|
||||
..()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_gang()
|
||||
var/winner
|
||||
var/datum/game_mode/gang/game_mode = ticker.mode
|
||||
if(istype(game_mode))
|
||||
if(game_mode.finished)
|
||||
winner = game_mode.finished
|
||||
else
|
||||
winner = "Draw"
|
||||
|
||||
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 [round((A_territory.len/start_state.num_territories)*100, 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:"
|
||||
gang_membership_report(A_gang)
|
||||
/datum/game_mode/proc/auto_declare_completion_gang(datum/gang/winner)
|
||||
for(var/datum/gang/G in gangs)
|
||||
world << "<br><b>The [G.name] Gang was [winner==G ? "<font color=green>victorious</font>" : "<font color=red>defeated</font>"] with [round((G.territory.len/start_state.num_territories)*100, 1)]% control of the station!</b>"
|
||||
world << "<br>The [G.name] Gang Bosses were:"
|
||||
gang_membership_report(G.bosses)
|
||||
world << "<br>The [G.name] Gangsters were:"
|
||||
gang_membership_report(G.gangsters)
|
||||
world << "<br>"
|
||||
|
||||
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 [round((B_territory.len/start_state.num_territories)*100, 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:"
|
||||
gang_membership_report(B_gang)
|
||||
world << "<br>"
|
||||
|
||||
|
||||
/datum/game_mode/proc/gang_membership_report(var/list/membership)
|
||||
var/text = ""
|
||||
@@ -474,161 +270,30 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
/datum/gang_points
|
||||
var/A = 15
|
||||
var/B = 15
|
||||
var/next_point_interval = 1800
|
||||
var/next_point_time
|
||||
|
||||
/datum/gang_points/proc/start()
|
||||
/datum/gang_points/New()
|
||||
next_point_time = world.time + next_point_interval
|
||||
spawn(next_point_interval)
|
||||
income()
|
||||
SSobj.processing += src
|
||||
|
||||
/datum/gang_points/proc/income()
|
||||
var/A_added_names = ""
|
||||
var/B_added_names = ""
|
||||
var/A_lost_names = ""
|
||||
var/B_lost_names = ""
|
||||
/datum/gang_points/process(seconds)
|
||||
var/list/winners = list() //stores the winners if there are any
|
||||
|
||||
//Process lost territories
|
||||
for(var/area in ticker.mode.A_territory_lost)
|
||||
if(A_lost_names == "")
|
||||
A_lost_names += ":<br>"
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
if(world.time > next_point_time)
|
||||
G.income()
|
||||
next_point_time = world.time + next_point_interval
|
||||
|
||||
if(isnum(G.dom_timer))
|
||||
G.dom_timer -= seconds/10
|
||||
if(G.dom_timer < 0)
|
||||
winners += G
|
||||
|
||||
if(winners.len)
|
||||
if(winners.len > 1) //Edge Case: If more than one dominator complete at the same time
|
||||
for(var/datum/gang/G in winners)
|
||||
G.domination(0.5)
|
||||
priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting takeover attempts appears to have restarted.","Network Alert")
|
||||
else
|
||||
A_lost_names += ", "
|
||||
A_lost_names += "[ticker.mode.A_territory_lost[area]], "
|
||||
ticker.mode.A_territory -= area
|
||||
|
||||
for(var/area in ticker.mode.B_territory_lost)
|
||||
if(B_lost_names == "")
|
||||
B_lost_names += ":<br>"
|
||||
else
|
||||
B_lost_names += ", "
|
||||
B_lost_names += "[ticker.mode.B_territory_lost[area]], "
|
||||
ticker.mode.B_territory -= area
|
||||
|
||||
var/datum/game_mode/gang/gangmode
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
gangmode = ticker.mode
|
||||
|
||||
//Count uniformed gangsters
|
||||
var/A_uniformed = 0
|
||||
var/B_uniformed = 0
|
||||
for(var/datum/mind/gangmind in (ticker.mode.A_gang|ticker.mode.A_bosses|ticker.mode.B_gang|ticker.mode.B_bosses))
|
||||
if(ishuman(gangmind.current))
|
||||
var/mob/living/carbon/human/gangster = gangmind.current
|
||||
//Gangster must be alive and on station
|
||||
if((gangster.stat == DEAD) || (gangster.z > ZLEVEL_STATION))
|
||||
continue
|
||||
|
||||
var/obj/item/clothing/outfit
|
||||
var/obj/item/clothing/gang_outfit
|
||||
if(gangster.w_uniform)
|
||||
outfit = gangster.w_uniform
|
||||
if(outfit.gang)
|
||||
gang_outfit = outfit
|
||||
if(gangster.wear_suit)
|
||||
outfit = gangster.wear_suit
|
||||
if(outfit.gang)
|
||||
gang_outfit = outfit
|
||||
|
||||
if(gang_outfit)
|
||||
gangster << "<span class='notice'>The [gang_name(gang_outfit.gang)] Gang's influence grows as you wear [gang_outfit].</span>"
|
||||
if(gang_outfit.gang == "A")
|
||||
A_uniformed ++
|
||||
else
|
||||
B_uniformed ++
|
||||
|
||||
//Calculate and report influence growth
|
||||
ticker.mode.message_gangtools(ticker.mode.A_tools,"*---------*<br><b>[gang_name("A")] Gang Status Report:</b>")
|
||||
var/A_message = ""
|
||||
if(gangmode && isnum(gangmode.A_timer))
|
||||
var/new_time = max(300,gangmode.A_timer - ((ticker.mode.A_territory.len + A_uniformed) * 2))
|
||||
if(new_time < gangmode.A_timer)
|
||||
A_message += "Takeover shortened by [gangmode.A_timer - new_time] seconds for defending [ticker.mode.A_territory.len] territories and [A_uniformed] uniformed gangsters.<BR>"
|
||||
gangmode.A_timer = new_time
|
||||
A_message += "[gangmode.A_timer] seconds remain in hostile takeover."
|
||||
else
|
||||
var/A_new = min(999,A + 15 + (A_uniformed * 2) + ticker.mode.A_territory.len)
|
||||
if(A_new != A)
|
||||
A_message += "Gang influence has increased by [A_new - A] for defending [ticker.mode.A_territory.len] territories and [A_uniformed] uniformed gangsters.<BR>"
|
||||
A = A_new
|
||||
A_message += "Your gang now has [A] influence."
|
||||
ticker.mode.message_gangtools(ticker.mode.A_tools,A_message,0)
|
||||
|
||||
ticker.mode.message_gangtools(ticker.mode.B_tools,"<b>[gang_name("B")] Gang Status Report:</b>")
|
||||
var/B_message = ""
|
||||
if(gangmode && isnum(gangmode.B_timer))
|
||||
var/new_time = max(300,gangmode.B_timer - ((ticker.mode.B_territory.len + B_uniformed) * 2))
|
||||
if(new_time < gangmode.B_timer)
|
||||
A_message += "Takeover shortened by [gangmode.B_timer - new_time] seconds for defending [ticker.mode.B_territory.len] territories and [B_uniformed] uniformed gangsters.<BR>"
|
||||
gangmode.B_timer = new_time
|
||||
B_message += "[gangmode.B_timer] seconds remain hostile takeover."
|
||||
else
|
||||
var/B_new = min(999,B + 15 + (B_uniformed * 2) + ticker.mode.B_territory.len)
|
||||
if(B_new != B)
|
||||
A_message += "Gang influence has increased by [B_new - B] for defending [ticker.mode.B_territory.len] territories and [B_uniformed] uniformed gangsters.<BR>"
|
||||
B = B_new
|
||||
B_message += "Your gang now has [B] influence."
|
||||
ticker.mode.message_gangtools(ticker.mode.B_tools,B_message,0)
|
||||
|
||||
|
||||
//Remove territories they already own from the buffer, so if they got tagged over, they can still earn income if they tag it back before the next status report
|
||||
ticker.mode.A_territory_new -= ticker.mode.A_territory
|
||||
ticker.mode.B_territory_new -= ticker.mode.B_territory
|
||||
|
||||
//Process new territories
|
||||
for(var/area in ticker.mode.A_territory_new)
|
||||
if(A_added_names == "")
|
||||
A_added_names += ":<br>"
|
||||
else
|
||||
A_added_names += ", "
|
||||
A_added_names += "[ticker.mode.A_territory_new[area]]"
|
||||
ticker.mode.A_territory += area
|
||||
|
||||
for(var/area in ticker.mode.B_territory_new)
|
||||
if(B_added_names == "")
|
||||
B_added_names += ":<br>"
|
||||
else
|
||||
B_added_names += ", "
|
||||
B_added_names += "[ticker.mode.B_territory_new[area]]"
|
||||
ticker.mode.B_territory += area
|
||||
|
||||
//Report territory changes
|
||||
ticker.mode.message_gangtools(ticker.mode.A_tools,"<b>[ticker.mode.A_territory_new.len] new territories</b><BR>[A_added_names]",0)
|
||||
ticker.mode.message_gangtools(ticker.mode.B_tools,"<b>[ticker.mode.B_territory_new.len] new territories</b><BR>[B_added_names]",0,)
|
||||
ticker.mode.message_gangtools(ticker.mode.A_tools,"<b>[ticker.mode.A_territory_lost.len] territories lost</b><BR>[A_lost_names]",0)
|
||||
ticker.mode.message_gangtools(ticker.mode.B_tools,"<b>[ticker.mode.B_territory_lost.len] territories lost</b><BR>[B_lost_names]",0)
|
||||
|
||||
//Clear the lists
|
||||
ticker.mode.A_territory_new = list()
|
||||
ticker.mode.B_territory_new = list()
|
||||
ticker.mode.A_territory_lost = list()
|
||||
ticker.mode.B_territory_lost = list()
|
||||
|
||||
var/A_control = round((ticker.mode.A_territory.len/start_state.num_territories)*100, 1)
|
||||
var/B_control = round((ticker.mode.B_territory.len/start_state.num_territories)*100, 1)
|
||||
ticker.mode.message_gangtools((ticker.mode.A_tools),"Your gang now has <b>[A_control]% control</b> of the station.<BR>*---------*",0)
|
||||
ticker.mode.message_gangtools((ticker.mode.B_tools),"Your gang now has <b>[B_control]% control</b> of the station.<BR>*---------*",0)
|
||||
|
||||
//Increase outfit stock
|
||||
for(var/obj/item/device/gangtool/tool in (ticker.mode.A_tools | ticker.mode.B_tools))
|
||||
tool.outfits = min(tool.outfits+2,5)
|
||||
|
||||
//Restart the counter
|
||||
start()
|
||||
|
||||
////////////////////////////////////////////////
|
||||
//Sends a message to the boss via his gangtool//
|
||||
////////////////////////////////////////////////
|
||||
|
||||
/datum/game_mode/proc/message_gangtools(var/list/gangtools,var/message,var/beep=1,var/warning)
|
||||
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 && mob.mind && mob.stat == CONSCIOUS)
|
||||
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='[warning ? "warning" : "notice"]'>\icon[tool] [message]</span>"
|
||||
if(beep)
|
||||
playsound(mob.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
ticker.force_ending = winners[1]
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
//gang_datum.dm
|
||||
//Datum-based gangs
|
||||
|
||||
/datum/gang
|
||||
var/name = "ERROR"
|
||||
var/color = "white"
|
||||
var/color_hex = "#FFFFFF"
|
||||
var/list/datum/mind/gangsters = list() //gang B Members
|
||||
var/list/datum/mind/bosses = list() //gang A Bosses
|
||||
var/list/obj/item/device/gangtool/gangtools = list()
|
||||
var/style
|
||||
var/fighting_style = "normal"
|
||||
var/list/territory = list()
|
||||
var/list/territory_new = list()
|
||||
var/list/territory_lost = list()
|
||||
var/dom_timer = "OFFLINE"
|
||||
var/dom_attempts = 2
|
||||
var/points = 15
|
||||
var/datum/atom_hud/antag/ganghud
|
||||
|
||||
/datum/gang/New(loc,gangname,gangcolor)
|
||||
if(!gang_colors_pool.len)
|
||||
message_admins("WARNING: Maximum number of gangs have been exceeded!")
|
||||
ERROR("WARNING: Maximum number of gangs have been exceeded!")
|
||||
else
|
||||
color = (gangcolor ? gangcolor : pick(gang_colors_pool))
|
||||
gang_colors_pool -= color
|
||||
switch(color)
|
||||
if("red")
|
||||
color_hex = "#DA0000"
|
||||
if("orange")
|
||||
color_hex = "#FF9300"
|
||||
if("yellow")
|
||||
color_hex = "#FFF200"
|
||||
if("green")
|
||||
color_hex = "#A8E61D"
|
||||
if("blue")
|
||||
color_hex = "#00B7EF"
|
||||
if("purple")
|
||||
color_hex = "#DA00FF"
|
||||
|
||||
name = (gangname ? gangname : pick(gang_name_pool))
|
||||
gang_name_pool -= name
|
||||
if(name == "Sleeping Carp")
|
||||
fighting_style = "martial"
|
||||
|
||||
ganghud = new()
|
||||
log_game("The [name] Gang has been created. Their gang color is [color].")
|
||||
|
||||
/datum/gang/proc/add_gang_hud(datum/mind/recruit_mind)
|
||||
ganghud.join_hud(recruit_mind.current)
|
||||
ticker.mode.set_antag_hud(recruit_mind.current, ((recruit_mind in bosses) ? "gang_boss" : "gangster"))
|
||||
|
||||
/datum/gang/proc/remove_gang_hud(datum/mind/defector_mind)
|
||||
ganghud.leave_hud(defector_mind.current)
|
||||
ticker.mode.set_antag_hud(defector_mind.current, null)
|
||||
|
||||
/datum/gang/proc/domination(var/modifier=1,var/obj/dominator)
|
||||
dom_timer = max(300,900 - ((round((territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier
|
||||
if(dominator)
|
||||
var/area/domloc = get_area(dominator.loc)
|
||||
priority_announce("Network breach detected in [initial(domloc.name)]. The [src] Gang is attempting to seize control of the station!","Network Alert")
|
||||
set_security_level("delta")
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
//////////////////////////////////////////// OUTFITS
|
||||
|
||||
|
||||
//Used by recallers when purchasing a gang outfit. First time a gang outfit is purchased the buyer decides a gang style which is stored so gang outfits are uniform
|
||||
/datum/gang/proc/gang_outfit(mob/living/carbon/user,var/obj/item/device/gangtool/gangtool)
|
||||
if(!user || !gangtool)
|
||||
return 0
|
||||
if(!gangtool.can_use(user))
|
||||
return 0
|
||||
|
||||
var/gang_style_list = list("Gang Colors","Black Suits","White Suits","Leather Jackets","Leather Overcoats","Puffer Jackets","Military Jackets","Tactical Turtlenecks","Soviet Uniforms")
|
||||
if(!style && gangtool.boss) //Only the boss gets to pick a style
|
||||
style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
|
||||
|
||||
if(gangtool.can_use(user) && (gangtool.outfits >= 1))
|
||||
var/outfit_path
|
||||
switch(style)
|
||||
if(null || "Gang Colors")
|
||||
outfit_path = text2path("/obj/item/clothing/under/color/[color]")
|
||||
if("Black Suits")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/charcoal
|
||||
if("White Suits")
|
||||
outfit_path = /obj/item/clothing/under/suit_jacket/white
|
||||
if("Puffer Jackets")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/puffer
|
||||
if("Leather Jackets")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/leather
|
||||
if("Leather Overcoats")
|
||||
outfit_path = /obj/item/clothing/suit/jacket/leather/overcoat
|
||||
if("Military Jackets")
|
||||
outfit_path = /obj/item/clothing/suit/miljacket
|
||||
if("Soviet Uniforms")
|
||||
outfit_path = /obj/item/clothing/under/soviet
|
||||
if("Tactical Turtlenecks")
|
||||
outfit_path = /obj/item/clothing/under/syndicate
|
||||
|
||||
if(outfit_path)
|
||||
var/obj/item/clothing/outfit = new outfit_path(user.loc)
|
||||
outfit.armor = list(melee = 20, bullet = 30, laser = 10, energy = 10, bomb = 20, bio = 0, rad = 0)
|
||||
outfit.desc += " Tailored for the [name] Gang to offer the wearer moderate protection against ballistics and physical trauma."
|
||||
outfit.gang = src
|
||||
user.put_in_any_hand_if_possible(outfit)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
//////////////////////////////////////////// MESSAGING
|
||||
|
||||
|
||||
/datum/gang/proc/message_gangtools(var/message,var/beep=1,var/warning)
|
||||
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 && mob.mind && mob.stat == CONSCIOUS)
|
||||
if(mob.mind.gang_datum == src)
|
||||
mob << "<span class='[warning ? "warning" : "notice"]'>\icon[tool] [message]</span>"
|
||||
if(beep)
|
||||
playsound(mob.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
|
||||
|
||||
//////////////////////////////////////////// INCOME
|
||||
|
||||
|
||||
/datum/gang/proc/income()
|
||||
if(!bosses.len)
|
||||
return
|
||||
|
||||
var/added_names = ""
|
||||
var/lost_names = ""
|
||||
|
||||
//Process lost territories
|
||||
for(var/area in territory_lost)
|
||||
if(lost_names == "")
|
||||
lost_names += ":<br>"
|
||||
else
|
||||
lost_names += ", "
|
||||
lost_names += "[territory_lost[area]], "
|
||||
territory -= area
|
||||
|
||||
//Count uniformed gangsters
|
||||
var/uniformed = 0
|
||||
for(var/datum/mind/gangmind in (gangsters|bosses))
|
||||
if(ishuman(gangmind.current))
|
||||
var/mob/living/carbon/human/gangster = gangmind.current
|
||||
//Gangster must be alive and on station
|
||||
if((gangster.stat == DEAD) || (gangster.z > ZLEVEL_STATION))
|
||||
continue
|
||||
|
||||
var/obj/item/clothing/outfit
|
||||
var/obj/item/clothing/gang_outfit
|
||||
if(gangster.w_uniform)
|
||||
outfit = gangster.w_uniform
|
||||
if(outfit.gang == src)
|
||||
gang_outfit = outfit
|
||||
if(gangster.wear_suit)
|
||||
outfit = gangster.wear_suit
|
||||
if(outfit.gang == src)
|
||||
gang_outfit = outfit
|
||||
|
||||
if(gang_outfit)
|
||||
gangster << "<span class='notice'>The [src] Gang's influence grows as you wear [gang_outfit].</span>"
|
||||
uniformed ++
|
||||
|
||||
//Calculate and report influence growth
|
||||
message_gangtools("*---------*<br><b>[src] Gang Status Report:</b>")
|
||||
var/message = ""
|
||||
if(isnum(dom_timer))
|
||||
var/new_time = max(300,dom_timer - ((territory.len + uniformed) * 2))
|
||||
if(new_time < dom_timer)
|
||||
message += "Takeover shortened by [dom_timer - new_time] seconds for defending [territory.len] territories and [uniformed] uniformed gangsters.<BR>"
|
||||
dom_timer = new_time
|
||||
message += "[dom_timer] seconds remain in hostile takeover."
|
||||
else
|
||||
var/points_new = min(999,points + 15 + (uniformed * 2) + territory.len)
|
||||
if(points_new != points)
|
||||
message += "Gang influence has increased by [points_new - points] for defending [territory.len] territories and [uniformed] uniformed gangsters.<BR>"
|
||||
points = points_new
|
||||
message += "Your gang now has [points] influence."
|
||||
message_gangtools(message,0)
|
||||
|
||||
|
||||
//Remove territories they already own from the buffer, so if they got tagged over, they can still earn income if they tag it back before the next status report
|
||||
territory_new -= territory
|
||||
|
||||
//Process new territories
|
||||
for(var/area in territory_new)
|
||||
if(added_names == "")
|
||||
added_names += ":<br>"
|
||||
else
|
||||
added_names += ", "
|
||||
added_names += "[territory_new[area]]"
|
||||
territory += area
|
||||
|
||||
//Report territory changes
|
||||
message_gangtools("<b>[territory_new.len] new territories</b><BR>[added_names]",0)
|
||||
message_gangtools("<b>[territory_lost.len] territories lost</b><BR>[lost_names]",0)
|
||||
|
||||
//Clear the lists
|
||||
territory_new = list()
|
||||
territory_lost = list()
|
||||
|
||||
var/control = round((territory.len/start_state.num_territories)*100, 1)
|
||||
message_gangtools("Your gang now has <b>[control]% control</b> of the station.<BR>*---------*",0)
|
||||
|
||||
//Increase outfit stock
|
||||
for(var/obj/item/device/gangtool/tool in gangtools)
|
||||
tool.outfits = min(tool.outfits+1,5)
|
||||
@@ -4,45 +4,50 @@
|
||||
/obj/item/weapon/pen/gang
|
||||
origin_tech = "materials=2;syndicate=5"
|
||||
var/cooldown
|
||||
var/last_used = 0
|
||||
var/charges = 1
|
||||
|
||||
/obj/item/weapon/pen/gang/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && ((user.mind in ticker.mode.A_bosses) || (user.mind in ticker.mode.B_bosses)))
|
||||
if(user.mind && (user.mind in ticker.mode.get_gang_bosses()))
|
||||
if(..(M,user,1))
|
||||
if(cooldown)
|
||||
user << "<span class='warning'>[src] needs more time to recharge before it can be used.</span>"
|
||||
return
|
||||
if(M.client)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
if(user.mind in ticker.mode.A_bosses)
|
||||
var/recruitable = ticker.mode.add_gangster(M.mind,"A")
|
||||
switch(recruitable)
|
||||
if(2)
|
||||
M.Paralyse(5)
|
||||
cooldown(max(0,ticker.mode.B_gang.len - ticker.mode.A_gang.len))
|
||||
if(1)
|
||||
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind has already been recruited into a gang!</span>"
|
||||
else if(user.mind in ticker.mode.B_bosses)
|
||||
var/recruitable = ticker.mode.add_gangster(M.mind,"B")
|
||||
switch(recruitable)
|
||||
if(2)
|
||||
M.Paralyse(5)
|
||||
cooldown(max(0,ticker.mode.A_gang.len - ticker.mode.B_gang.len))
|
||||
if(1)
|
||||
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind has already been recruited into a gang!</span>"
|
||||
var/datum/gang/G = user.mind.gang_datum
|
||||
var/recruitable = ticker.mode.add_gangster(M.mind,G)
|
||||
switch(recruitable)
|
||||
if(2)
|
||||
M.Paralyse(5)
|
||||
cooldown(G)
|
||||
if(1)
|
||||
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind has already been recruited into a gang!</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/pen/gang/proc/cooldown(modifier)
|
||||
/obj/item/weapon/pen/gang/proc/cooldown(datum/gang/gang)
|
||||
var/cooldown_time = 1200+(600*gang.bosses.len) // 1recruiter=3mins, 2recruiters=4mins, 3recruiters=5 mins
|
||||
|
||||
cooldown = 1
|
||||
icon_state = "pen_blink"
|
||||
spawn(max(50,1800-(modifier*300)))
|
||||
|
||||
charges = max(0,charges-1)
|
||||
var/time_passed = world.time - last_used
|
||||
var/time = time_passed/cooldown_time
|
||||
for(null, time>=cooldown_time, time-=cooldown_time) //get 1 charge every cooldown interval
|
||||
charges++
|
||||
|
||||
last_used = world.time - time
|
||||
|
||||
if(charges)
|
||||
cooldown_time = 50
|
||||
spawn(cooldown_time)
|
||||
cooldown = 0
|
||||
icon_state = "pen"
|
||||
var/mob/M = get(src, /mob)
|
||||
@@ -57,7 +62,7 @@
|
||||
name = "gang implant"
|
||||
desc = "Makes you a gangster or such."
|
||||
activated = 0
|
||||
var/gang
|
||||
var/datum/gang/gang
|
||||
|
||||
/obj/item/weapon/implant/gang/New(loc,var/setgang)
|
||||
..()
|
||||
@@ -81,11 +86,12 @@
|
||||
if(I != src)
|
||||
qdel(I)
|
||||
|
||||
ticker.mode.remove_gangster(target.mind,0,1,1)
|
||||
if(ticker.mode.add_gangster(target.mind,gang))
|
||||
target.Paralyse(5)
|
||||
else
|
||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the influence of your enemies try to invade your mind!</span>")
|
||||
if(target.stat != DEAD)
|
||||
ticker.mode.remove_gangster(target.mind,0,1)
|
||||
if(ticker.mode.add_gangster(target.mind,gang))
|
||||
target.Paralyse(5)
|
||||
else
|
||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the influence of your enemies try to invade your mind!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/implanter/gang/New(loc,var/gang)
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
//gangtool device
|
||||
/obj/item/device/gangtool
|
||||
name = "suspicious device"
|
||||
desc = "A strange device of sorts. Hard to really make out what it actually does just by looking."
|
||||
icon_state = "gangtool"
|
||||
desc = "A strange device of sorts. Hard to really make out what it actually does if you don't know how to operate it."
|
||||
icon_state = "gangtool-white"
|
||||
item_state = "walkietalkie"
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
var/gang //Which gang uses this?
|
||||
var/datum/gang/gang //Which gang uses this?
|
||||
var/boss = 1 //If this gangtool belongs to the big boss
|
||||
var/recalling = 0
|
||||
var/outfits = 3
|
||||
var/free_pen = 0
|
||||
var/promotable = 1
|
||||
|
||||
/obj/item/device/gangtool/New() //Initialize supply point income if it hasn't already been started
|
||||
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))
|
||||
@@ -28,23 +27,25 @@
|
||||
var/dat
|
||||
if(!gang)
|
||||
dat += "This device is not registered.<br><br>"
|
||||
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
|
||||
if(user.mind in ticker.mode.get_gang_bosses())
|
||||
if(promotable && user.mind.gang_datum.bosses < 3)
|
||||
dat += "Give this device to another member of your organization to use to promote them to Lieutenant.<hr>"
|
||||
dat += "If this is meant as a spare device for yourself:<br>"
|
||||
else
|
||||
dat += "No promotions available: All positions filled.<br>"
|
||||
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
|
||||
else if (promotable && user.mind.gang_datum.bosses < 3)
|
||||
dat += "You have been selected for a promotion!<br>"
|
||||
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
|
||||
else
|
||||
dat += "No promotions available: All positions filled.<br>"
|
||||
else
|
||||
var/datum/game_mode/gang/gangmode
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
gangmode = ticker.mode
|
||||
if(isnum(gang.dom_timer))
|
||||
dat += "<center><font color='red'>Takeover In Progress:<br><B>[gang.dom_timer] seconds remain</B></font></center><br>"
|
||||
|
||||
var/gang_size = ((gang == "A")? (ticker.mode.A_bosses.len+ticker.mode.A_gang.len) : (ticker.mode.B_bosses.len+ticker.mode.B_gang.len))
|
||||
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)
|
||||
var/timer
|
||||
if(gangmode)
|
||||
timer = ((gang == "A") ? gangmode.A_timer : gangmode.B_timer)
|
||||
if(isnum(timer))
|
||||
dat += "<center><font color='red'>Takeover In Progress:<br><B>[timer] seconds remain</B></font></center><br>"
|
||||
|
||||
dat += "Registration: <B>[gang_name(gang)] Gang [boss ? "Boss" : "Lieutenant"]</B><br>"
|
||||
dat += "Organization Size: <B>[gang_size]</B> | Station Control: <B>[round((gang_territory/start_state.num_territories)*100, 1)]%</B><br>"
|
||||
var/points = gang.points
|
||||
dat += "Registration: <B>[gang.name] Gang [boss ? "Boss" : "Lieutenant"]</B><br>"
|
||||
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "Gang Influence: <B>[points]</B> | Outfit Stock: <B>[outfits]</B><br>"
|
||||
dat += "Time until Influence grows: <B>[(points >= 999) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
|
||||
dat += "<hr>"
|
||||
@@ -55,8 +56,7 @@
|
||||
dat += "<a href='?src=\ref[src];choice=outfit'>Create Armored Gang Outfit</a><br>"
|
||||
else
|
||||
dat += "<b>Create Gang Outfit</b> (Restocking)<br>"
|
||||
if(gangmode)
|
||||
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
|
||||
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<B>Purchase Weapons:</B><br>"
|
||||
@@ -65,7 +65,7 @@
|
||||
// NORMAL GANG //
|
||||
/////////////////
|
||||
|
||||
if(!gangmode || (gang == "A" && gangmode.A_fighting_style == "normal") || (gang == "B" && gangmode.B_fighting_style == "normal")) //If the gamemode is not gang, always use standard loadout.
|
||||
if(gang.fighting_style == "normal")
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=switchblade'>Switchblade</a><br>"
|
||||
@@ -102,7 +102,7 @@
|
||||
// MARTIAL ARTS //
|
||||
//////////////////
|
||||
|
||||
else if((gang == "A" && gangmode.A_fighting_style == "martial") || (gang == "B" && gangmode.B_fighting_style == "martial"))
|
||||
else if(gang.fighting_style == "martial")
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=bostaff'>Bo Staff</a><br>"
|
||||
@@ -146,28 +146,33 @@
|
||||
else
|
||||
dat += "Implant Breaker<br>"
|
||||
|
||||
dat += "(50 Influence) "
|
||||
if(points >= 50)
|
||||
if(free_pen)
|
||||
dat += "(GET ONE FREE) "
|
||||
else
|
||||
dat += "(50 Influence) "
|
||||
if((points >= 50)||free_pen)
|
||||
dat += "<a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
|
||||
else
|
||||
dat += "Recruitment Pen<br>"
|
||||
|
||||
dat += "(30 Influence) "
|
||||
if(points >= 30)
|
||||
dat += "<a href='?src=\ref[src];purchase=gangtool'>Spare Gangtool</a><br>"
|
||||
var/gangtooltext = "Spare Gangtool"
|
||||
if(boss && gang.bosses.len < 3)
|
||||
gangtooltext = "Promote a Gangster"
|
||||
dat += "(10 Influence) "
|
||||
if(points >= 10)
|
||||
dat += "<a href='?src=\ref[src];purchase=gangtool'>[gangtooltext]</a><br>"
|
||||
else
|
||||
dat += "Spare Gangtool<br>"
|
||||
dat += "[gangtooltext]<br>"
|
||||
|
||||
if(gangmode)
|
||||
if(gang == "A" ? !gangmode.A_dominations : !gangmode.B_dominations)
|
||||
dat += "(Out of stock) Station Dominator"
|
||||
if(!gang.dom_attempts)
|
||||
dat += "(Out of stock) Station Dominator"
|
||||
else
|
||||
dat += "(30 Influence) "
|
||||
if(points >= 30)
|
||||
dat += "<a href='?src=\ref[src];purchase=dominator'><b>Station Dominator</b></a><br>"
|
||||
else
|
||||
dat += "(30 Influence) "
|
||||
if(points >= 30)
|
||||
dat += "<a href='?src=\ref[src];purchase=dominator'><b>Station Dominator</b></a><br>"
|
||||
else
|
||||
dat += "<b>Station Dominator</b><br>"
|
||||
dat += "<i>(Estimated Takeover Time: [round(max(300,900 - ((round((gang_territory/start_state.num_territories)*200, 10) - 60) * 15))/60,1)] minutes)</i><br>"
|
||||
dat += "<b>Station Dominator</b><br>"
|
||||
dat += "<i>(Estimated Takeover Time: [round(max(300,900 - ((round((gang.territory.len/start_state.num_territories)*200, 10) - 60) * 15))/60,1)] minutes)</i><br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
|
||||
@@ -189,108 +194,107 @@
|
||||
return
|
||||
|
||||
if(href_list["register"])
|
||||
register_device(usr)
|
||||
if(promotable)
|
||||
register_device(usr)
|
||||
|
||||
else if(!gang) //Gangtool must be registered before you can use the functions below
|
||||
return
|
||||
|
||||
if(href_list["purchase"])
|
||||
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
|
||||
var/pointcost
|
||||
var/item_type
|
||||
switch(href_list["purchase"])
|
||||
if("spraycan")
|
||||
if(points >= 5)
|
||||
if(gang.points >= 5)
|
||||
item_type = /obj/item/toy/crayon/spraycan/gang
|
||||
points = 5
|
||||
pointcost = 5
|
||||
if("switchblade")
|
||||
if(points >= 10)
|
||||
if(gang.points >= 10)
|
||||
item_type = /obj/item/weapon/switchblade
|
||||
points = 10
|
||||
pointcost = 10
|
||||
if("pistol")
|
||||
if(points >= 25)
|
||||
if(gang.points >= 25)
|
||||
item_type = /obj/item/weapon/gun/projectile/automatic/pistol
|
||||
points = 25
|
||||
pointcost = 25
|
||||
if("10mmammo")
|
||||
if(points >= 10)
|
||||
if(gang.points >= 10)
|
||||
item_type = /obj/item/ammo_box/magazine/m10mm
|
||||
points = 10
|
||||
pointcost = 10
|
||||
if("uzi")
|
||||
if(points >= 50)
|
||||
if(gang.points >= 50)
|
||||
item_type = /obj/item/weapon/gun/projectile/automatic/mini_uzi
|
||||
points = 50
|
||||
pointcost = 50
|
||||
if("9mmammo")
|
||||
if(points >= 20)
|
||||
if(gang.points >= 20)
|
||||
item_type = /obj/item/ammo_box/magazine/uzim9mm
|
||||
points = 20
|
||||
pointcost = 20
|
||||
if("scroll")
|
||||
if(points >= 30)
|
||||
if(gang.points >= 30)
|
||||
item_type = /obj/item/weapon/sleeping_carp_scroll
|
||||
usr << "<span class='notice'>Anyone who reads the <b>sleeping carp scroll</b> will learn secrets of the sleeping carp martial arts style.</span>"
|
||||
points = 30
|
||||
pointcost = 30
|
||||
if("wrestlingbelt")
|
||||
if(points >= 20)
|
||||
if(gang.points >= 20)
|
||||
item_type = /obj/item/weapon/storage/belt/champion/wrestling
|
||||
usr << "<span class='notice'>Anyone wearing the <b>wresting belt</b> will know how to be effective with wrestling.</span>"
|
||||
points = 20
|
||||
pointcost = 20
|
||||
if("bostaff")
|
||||
if(points >= 10)
|
||||
if(gang.points >= 10)
|
||||
item_type = /obj/item/weapon/twohanded/bostaff
|
||||
points = 10
|
||||
pointcost = 10
|
||||
if("C4")
|
||||
if(points >= 10)
|
||||
if(gang.points >= 10)
|
||||
item_type = /obj/item/weapon/c4
|
||||
points = 10
|
||||
pointcost = 10
|
||||
if("pen")
|
||||
if(points >= 50)
|
||||
if((gang.points >= 50) || free_pen)
|
||||
item_type = /obj/item/weapon/pen/gang
|
||||
usr << "<span class='notice'>More <b>recruitmen pens</b> will allow you to recruit gangsters faster. Only gang leaders can recruit with pens.</span>"
|
||||
points = 50
|
||||
if(!free_pen)
|
||||
pointcost = 50
|
||||
if("implant")
|
||||
if(points >= 10)
|
||||
if(gang.points >= 10)
|
||||
item_type = /obj/item/weapon/implanter/gang
|
||||
usr << "<span class='notice'>The <b>implant breaker</b> is a single-use device that destroys all implants within the target before trying to recruit them to your gang. Also works on enemy gangsters.</span>"
|
||||
points = 10
|
||||
pointcost = 10
|
||||
if("gangtool")
|
||||
if(points >= 30)
|
||||
item_type = /obj/item/device/gangtool/lt
|
||||
points = 30
|
||||
if(gang.points >= 10)
|
||||
if(boss)
|
||||
item_type = /obj/item/device/gangtool/spare
|
||||
if(gang.bosses.len < 3)
|
||||
usr << "<span class='notice'><b>Gangtools</b> allow you to promote a gangster to be your Lieutenant. Simply have them register the gangtool. You may promote up to [3-gang.bosses.len] more Lieutenants</span>"
|
||||
else
|
||||
item_type = /obj/item/device/gangtool/spare/lt
|
||||
pointcost = 10
|
||||
if("dominator")
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
if(isnum((gang == "A") ? mode.A_timer : mode.B_timer))
|
||||
if(!gang.dom_attempts)
|
||||
return
|
||||
|
||||
var/area/usrarea = get_area(usr.loc)
|
||||
var/usrturf = get_turf(usr.loc)
|
||||
if(initial(usrarea.name) == "Space" || istype(usrturf,/turf/space) || usr.z != 1)
|
||||
usr << "<span class='warning'>You can only use this on the station!</span>"
|
||||
return
|
||||
|
||||
for(var/obj/obj in usrturf)
|
||||
if(obj.density)
|
||||
usr << "<span class='warning'>There's not enough room here!</span>"
|
||||
return
|
||||
|
||||
if(gang == "A" ? !mode.A_dominations : !mode.B_dominations)
|
||||
return
|
||||
|
||||
var/area/usrarea = get_area(usr.loc)
|
||||
var/usrturf = get_turf(usr.loc)
|
||||
if(initial(usrarea.name) == "Space" || istype(usrturf,/turf/space) || usr.z != 1)
|
||||
usr << "<span class='warning'>You can only use this on the station!</span>"
|
||||
return
|
||||
|
||||
for(var/obj/obj in usrturf)
|
||||
if(obj.density)
|
||||
usr << "<span class='warning'>There's not enough room here!</span>"
|
||||
return
|
||||
|
||||
if(points >= 30)
|
||||
item_type = /obj/machinery/dominator
|
||||
usr << "<span class='notice'>The <b>dominator</b> will secure your gang's dominance over the station. Turn it on when you are ready to defend it.</span>"
|
||||
points = 30
|
||||
if(gang.points >= 30)
|
||||
item_type = /obj/machinery/dominator
|
||||
usr << "<span class='notice'>The <b>dominator</b> will secure your gang's dominance over the station. Turn it on when you are ready to defend it.</span>"
|
||||
pointcost = 30
|
||||
|
||||
if(item_type)
|
||||
if(gang == "A")
|
||||
ticker.mode.gang_points.A -= points
|
||||
else if(gang == "B")
|
||||
ticker.mode.gang_points.B -= points
|
||||
gang.points -= pointcost
|
||||
if(ispath(item_type))
|
||||
var/obj/purchased = new item_type(get_turf(usr),gang)
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.put_in_any_hand_if_possible(purchased)
|
||||
if(points)
|
||||
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.")
|
||||
log_game("A [href_list["purchase"]] was purchased by [key_name(usr)] for [points] Influence.")
|
||||
if(pointcost)
|
||||
gang.message_gangtools("A [href_list["purchase"]] was purchased by [usr.real_name] for [pointcost] Influence.")
|
||||
log_game("A [href_list["purchase"]] was purchased by [key_name(usr)] ([gang.name] Gang) for [pointcost] Influence.")
|
||||
|
||||
else
|
||||
usr << "<span class='warning'>Not enough influence.</span>"
|
||||
@@ -301,7 +305,7 @@
|
||||
recall(usr)
|
||||
if("outfit")
|
||||
if(outfits > 0)
|
||||
if(ticker.mode.gang_outfit(usr,src,gang))
|
||||
if(gang.gang_outfit(usr,src))
|
||||
outfits -= 1
|
||||
if("ping")
|
||||
ping_gang(usr)
|
||||
@@ -317,69 +321,70 @@
|
||||
if(user.z > 2)
|
||||
user << "<span class='info'>\icon[src]Error: Station out of range.</span>"
|
||||
return
|
||||
var/list/members = list()
|
||||
if(gang == "A")
|
||||
members += ticker.mode.A_bosses | ticker.mode.A_gang
|
||||
else if(gang == "B")
|
||||
members += ticker.mode.B_bosses | ticker.mode.B_gang
|
||||
var/list/members = list(gang.gangsters + gang.bosses)
|
||||
if(members.len)
|
||||
var/ping = "<span class='danger'><B><i>[gang_name(gang)] [boss ? "Gang Boss" : "Lieutenant"] [user.real_name]</i>: [message]</B></span>"
|
||||
var/ping = "<span class='danger'><B><i>[gang.name] [boss ? "Gang Boss" : "Lieutenant"]</i>: [message]</B></span>"
|
||||
for(var/datum/mind/ganger in members)
|
||||
if((ganger.current.z <= 2) && (ganger.current.stat == CONSCIOUS))
|
||||
ganger.current << ping
|
||||
for(var/mob/M in dead_mob_list)
|
||||
M << ping
|
||||
log_game("[key_name(user)] Messaged [gang_name(gang)] Gang ([gang]): [message].")
|
||||
log_game("[key_name(user)] Messaged [gang.name] Gang: [message].")
|
||||
|
||||
|
||||
/obj/item/device/gangtool/proc/register_device(var/mob/user)
|
||||
if(user.mind in ticker.mode.A_bosses)
|
||||
ticker.mode.A_tools += src
|
||||
gang = "A"
|
||||
icon_state = "gangtool-a"
|
||||
else if(user.mind in ticker.mode.B_bosses)
|
||||
ticker.mode.B_tools += src
|
||||
gang = "B"
|
||||
icon_state = "gangtool-b"
|
||||
if(!gang)
|
||||
if(user.mind in ticker.mode.get_all_gangsters())
|
||||
gang = user.mind.gang_datum
|
||||
gang.gangtools += src
|
||||
icon_state = "gangtool-[gang.color]"
|
||||
if(!(user.mind in gang.bosses))
|
||||
ticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
gang.bosses += user.mind
|
||||
user.mind.special_role = "[gang.name] Gang Lieutenant"
|
||||
gang.add_gang_hud(user.mind)
|
||||
log_game("[key_name(user)] has been promoted to Lieutenant in the [gang.name] Gang")
|
||||
free_pen = 1
|
||||
gang.message_gangtools("[user] has been promoted to Lieutenant.")
|
||||
user << "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>"
|
||||
ticker.mode.forge_gang_objectives(user.mind)
|
||||
ticker.mode.greet_gang(user.mind,0)
|
||||
user << "The <b>Gangtool</b> you registered will allow you to purchase items, send messages to your gangsters and to recall the emergency shuttle from anywhere on the station."
|
||||
user << "Unlike regular gangsters, you may use <b>recruitment pens</b> to add recruits to your gang. Use them on unsuspecting crew members to recruit them. Don't forget to get your one free pen from the gangtool."
|
||||
else
|
||||
usr << "<span class='warning'>ACCESS DENIED: Unauthorized user.</span>"
|
||||
|
||||
/obj/item/device/gangtool/proc/recall(mob/user)
|
||||
if(!can_use(user))
|
||||
return 0
|
||||
|
||||
if(!istype(ticker.mode, /datum/game_mode/gang))
|
||||
return 0
|
||||
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "[usr] is attempting to recall the emergency shuttle.")
|
||||
gang.message_gangtools("[usr] is attempting to recall the emergency shuttle.")
|
||||
recalling = 1
|
||||
loc << "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>"
|
||||
|
||||
sleep(rand(100,300))
|
||||
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_CALL) //Shuttle can only be recalled when it's moving to the station
|
||||
user << "<span class='info'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>"
|
||||
user << "<span class='warning'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>"
|
||||
recalling = 0
|
||||
return 0
|
||||
loc << "<span class='info'>\icon[src]Shuttle recall order generated. Accessing station long-range communication arrays...</span>"
|
||||
|
||||
sleep(rand(100,300))
|
||||
|
||||
if(gang == "A" ? !mode.A_dominations : !mode.B_dominations)
|
||||
user << "<span class='info'>\icon[src]Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>"
|
||||
if(!gang.dom_attempts)
|
||||
user << "<span class='warning'>\icon[src]Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>"
|
||||
recalling = 0
|
||||
return 0
|
||||
|
||||
var/turf/userturf = get_turf(user)
|
||||
if(userturf.z != 1) //Shuttle can only be recalled while on station
|
||||
user << "<span class='info'>\icon[src]Error: Device out of range of station communication arrays.</span>"
|
||||
user << "<span class='warning'>\icon[src]Error: Device out of range of station communication arrays.</span>"
|
||||
recalling = 0
|
||||
return 0
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
if((100 * start_state.score(end_state)) < 70) //Shuttle cannot be recalled if the station is too damaged
|
||||
user << "<span class='info'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>"
|
||||
user << "<span class='warning'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>"
|
||||
recalling = 0
|
||||
return 0
|
||||
loc << "<span class='info'>\icon[src]Comm arrays accessed. Broadcasting recall signal...</span>"
|
||||
@@ -404,21 +409,14 @@
|
||||
return
|
||||
if(!(src in user.contents))
|
||||
return
|
||||
|
||||
var/success
|
||||
if(user.mind)
|
||||
if(gang)
|
||||
if((gang == "A") && (user.mind in ticker.mode.A_bosses))
|
||||
success = 1
|
||||
else if((gang == "B") && (user.mind in ticker.mode.B_bosses))
|
||||
success = 1
|
||||
else
|
||||
success = 1
|
||||
if(success)
|
||||
if(gang && !(user.mind in gang.bosses))
|
||||
return
|
||||
return 1
|
||||
user << "<span class='warning'>\icon[src] ACCESS DENIED: Unauthorized user.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/device/gangtool/lt
|
||||
/obj/item/device/gangtool/spare
|
||||
boss = 0
|
||||
outfits = 1
|
||||
|
||||
/obj/item/device/gangtool/spare/lt
|
||||
promotable = 0
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
/datum/intercept_text/proc/build_gang(datum/mind/correct_person)
|
||||
src.text += "<BR><BR>We have reports of criminal activity in close proximity to our operations within your sector."
|
||||
src.text += "Ensure law and order is maintained on the station and be on the lookout for aggressive factionalism within the crew."
|
||||
src.text += "Ensure law and order is maintained on the station and be on the lookout for territorial aggression within the crew."
|
||||
src.text += "In the event of a full-scale criminal takeover threat, sensitive research items are to be secured and the station evacuated ASAP."
|
||||
src.text += "<BR><HR>"
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
name = e_name
|
||||
desc = "A [name] drawn in crayon."
|
||||
if(type == "poseur tag")
|
||||
gang_name() //Generate gang names so they get removed from the pool
|
||||
type = pick(gang_name_pool)
|
||||
icon_state = type
|
||||
|
||||
@@ -31,37 +30,27 @@
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang
|
||||
layer = 3.6 //Harder to hide
|
||||
var/gang
|
||||
var/datum/gang/gang
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/New(location, var/type, var/e_name = "gang tag", var/rotation = 0)
|
||||
if(!type)
|
||||
/obj/effect/decal/cleanable/crayon/gang/New(location, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0)
|
||||
if(!type || !G)
|
||||
qdel(src)
|
||||
|
||||
var/area/territory = get_area(location)
|
||||
var/color
|
||||
|
||||
if(type == "A")
|
||||
gang = type
|
||||
color = "#00B7EF"
|
||||
icon_state = gang_name("A")
|
||||
ticker.mode.A_territory_new |= list(territory.type = territory.name)
|
||||
ticker.mode.A_territory_lost -= territory.type
|
||||
else if(type == "B")
|
||||
gang = type
|
||||
color = "#DA0000"
|
||||
icon_state = gang_name("B")
|
||||
ticker.mode.B_territory_new |= list(territory.type = territory.name)
|
||||
ticker.mode.B_territory_lost -= territory.type
|
||||
gang = G
|
||||
color = G.color_hex
|
||||
icon_state = G.name
|
||||
G.territory_new |= list(territory.type = territory.name)
|
||||
G.territory_lost -= territory.type
|
||||
|
||||
..(location, color, icon_state, e_name, rotation)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
var/area/territory = get_area(src)
|
||||
|
||||
if(gang == "A")
|
||||
ticker.mode.A_territory_new -= territory.type
|
||||
ticker.mode.A_territory_lost |= list(territory.type = territory.name)
|
||||
if(gang == "B")
|
||||
ticker.mode.B_territory_new -= territory.type
|
||||
ticker.mode.B_territory_lost |= list(territory.type = territory.name)
|
||||
if(gang)
|
||||
gang.territory_new -= territory.type
|
||||
gang.territory_lost |= list(territory.type = territory.name)
|
||||
..()
|
||||
@@ -185,7 +185,7 @@
|
||||
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
|
||||
if((BM.mind in ticker.mode.head_revolutionaries) || (BM.mind in ticker.mode.A_bosses) || (BM.mind in ticker.mode.B_bosses))
|
||||
if(BM.mind in (ticker.mode.head_revolutionaries|ticker.mode.get_gang_bosses()))
|
||||
user << "<span class='warning'>The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -420,28 +420,16 @@
|
||||
var/gangID
|
||||
if(gang)
|
||||
//Determine gang affiliation
|
||||
if(user.mind in (ticker.mode.A_bosses | ticker.mode.A_gang))
|
||||
temp = "[gang_name("A")] gang tag"
|
||||
gangID = "A"
|
||||
else if(user.mind in (ticker.mode.B_bosses | ticker.mode.B_gang))
|
||||
temp = "[gang_name("B")] gang tag"
|
||||
gangID = "B"
|
||||
gangID = user.mind.gang_datum
|
||||
|
||||
//Check area validity. Reject space, player-created areas, and non-station z-levels.
|
||||
if (gangID)
|
||||
if(gangID)
|
||||
territory = get_area(target)
|
||||
if(territory && (territory.z == ZLEVEL_STATION) && territory.valid_territory)
|
||||
//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
|
||||
if(territory_claimed(territory, user))
|
||||
return
|
||||
/*
|
||||
//Prevent people spraying from outside of the territory (ie. Maint walls)
|
||||
var/area/user_area = get_area(user.loc)
|
||||
if(istype(user_area) && (user_area.type != territory.type))
|
||||
user << "<span class='warning'>You cannot tag [territory] from the outside.</span>"
|
||||
return
|
||||
*/
|
||||
if(locate(/obj/machinery/power/apc) in (user.loc.contents | target.contents))
|
||||
user << "<span class='warning'>You cannot tag here.</span>"
|
||||
return
|
||||
@@ -508,10 +496,10 @@
|
||||
|
||||
/obj/item/toy/crayon/proc/territory_claimed(var/area/territory,mob/user)
|
||||
var/occupying_gang
|
||||
if(territory.type in (ticker.mode.A_territory | ticker.mode.A_territory_new))
|
||||
occupying_gang = gang_name("A")
|
||||
if(territory.type in (ticker.mode.B_territory | ticker.mode.B_territory_new))
|
||||
occupying_gang = gang_name("B")
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
if(territory.type in (G.territory|G.territory_new))
|
||||
occupying_gang = G.name
|
||||
break
|
||||
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
|
||||
|
||||
@@ -238,11 +238,11 @@
|
||||
|
||||
/obj/item/weapon/implant/loyalty/implanted(mob/target)
|
||||
..()
|
||||
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.A_bosses | ticker.mode.B_bosses)) || is_shadow_or_thrall(target))
|
||||
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.get_gang_bosses())) || is_shadow_or_thrall(target))
|
||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
|
||||
return 0
|
||||
if(target.mind in (ticker.mode.A_gang | ticker.mode.B_gang))
|
||||
ticker.mode.remove_gangster(target.mind,exclude_bosses=1)
|
||||
if(target.mind in ticker.mode.get_gangsters())
|
||||
ticker.mode.remove_gangster(target.mind)
|
||||
target.visible_message("<span class='warning'>[src] was destroyed in the process!</span>", "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>")
|
||||
return 0
|
||||
if(target.mind in ticker.mode.revolutionaries)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
ticker.mode.remove_cultist(M.brainmob.mind, 1)
|
||||
ticker.mode.remove_revolutionary(M.brainmob.mind, 1)
|
||||
ticker.mode.remove_gangster(M.brainmob.mind, 1)
|
||||
ticker.mode.remove_gangster(M.brainmob.mind, 1, remove_bosses=1)
|
||||
|
||||
M.loc = src
|
||||
brain = M
|
||||
|
||||
@@ -387,32 +387,16 @@
|
||||
dat += "<tr><td><i>Head not found!</i></td></tr>"
|
||||
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: [(ticker.mode.gang_points ? "[ticker.mode.gang_points.A] Influence, " : "")][round((ticker.mode.A_territory.len/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.A_bosses)
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: <a href='?_src_=holder;gangpoints=\ref[G]'>[G.points] Influence</a> | [round((G.territory.len/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in G.bosses)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
dat += "<tr><td><i>Gang Boss not found!</i></td></tr>"
|
||||
else
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Boss)</b>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.A_gang)
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
|
||||
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: [(ticker.mode.gang_points ? "[ticker.mode.gang_points.B] Influence, " : "")][round((ticker.mode.B_territory.len/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.B_bosses)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
dat += "<tr><td><i>Gang Boss not found!</i></td></tr>"
|
||||
else
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Boss)</b>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
|
||||
for(var/datum/mind/N in ticker.mode.B_gang)
|
||||
for(var/datum/mind/N in G.gangsters)
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
|
||||
@@ -103,11 +103,11 @@
|
||||
new/datum/round_event/blob(strength)
|
||||
if("12")
|
||||
if(src.makeGangsters())
|
||||
message_admins("[key_name(usr)] started a gang war.")
|
||||
log_admin("[key_name(usr)] started a gang war.")
|
||||
message_admins("[key_name(usr)] created gangs.")
|
||||
log_admin("[key_name(usr)] created gangs.")
|
||||
else
|
||||
message_admins("[key_name(usr)] tried to start a gang war. Unfortunately, there were not enough candidates available.")
|
||||
log_admin("[key_name(usr)] failed to start a gang war.")
|
||||
message_admins("[key_name(usr)] tried to create gangs. Unfortunately, there were not enough candidates available.")
|
||||
log_admin("[key_name(usr)] failed create gangs.")
|
||||
if("13")
|
||||
message_admins("[key_name(usr)] is creating a Centcom response team...")
|
||||
if(src.makeEmergencyresponseteam())
|
||||
@@ -1491,6 +1491,16 @@
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
|
||||
else if(href_list["gangpoints"])
|
||||
var/datum/gang/G = locate(href_list["gangpoints"]) in ticker.mode.gangs
|
||||
if(G)
|
||||
var/newpoints = input("Set [G.name ] Gang's influence.","Set Influence",G.points) as null|num
|
||||
if(newpoints)
|
||||
message_admins("[key_name_admin(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints]</span>")
|
||||
log_admin("[key_name(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints]</span>")
|
||||
G.points = newpoints
|
||||
G.message_gangtools("Your gang now has [G.points] influence.")
|
||||
|
||||
else if(href_list["adminplayeropts"])
|
||||
var/mob/M = locate(href_list["adminplayeropts"])
|
||||
show_player_panel(M)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/datum/admins/proc/one_click_antag()
|
||||
|
||||
var/dat = {"<B>Quick-Create Antagonist</B><br>
|
||||
var/dat = {"
|
||||
<a href='?src=\ref[src];makeAntag=1'>Make Traitors</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=2'>Make Changelings</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=3'>Make Revs</a><br>
|
||||
@@ -25,17 +25,10 @@
|
||||
<a href='?src=\ref[src];makeAntag=14'>Make Abductor Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=15'>Make Revenant (Requires Ghost)</a><br>
|
||||
"}
|
||||
/* These dont work just yet
|
||||
Ninja, aliens and deathsquad I have not looked into yet
|
||||
Nuke team is getting a null mob returned from makebody() (runtime error: null.mind. Line 272)
|
||||
|
||||
|
||||
<a href='?src=\ref[src];makeAntag=8'>Make Space Ninja (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=9'>Make Aliens (Requires Ghosts)</a><br>
|
||||
"}
|
||||
*/
|
||||
usr << browse(dat, "window=oneclickantag;size=400x400")
|
||||
return
|
||||
var/datum/browser/popup = new(usr, "oneclickantag", "Quick-Create Antagonist", 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/datum/admins/proc/makeMalfAImode()
|
||||
@@ -404,15 +397,20 @@
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len >= 2)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Gang("A")
|
||||
candidates.Remove(H)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Gang("B")
|
||||
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
|
||||
H = pick(candidates)
|
||||
if(gang_colors_pool)
|
||||
var/datum/gang/newgang = new()
|
||||
ticker.mode.gangs += newgang
|
||||
H.mind.make_Gang(newgang)
|
||||
candidates.Remove(H)
|
||||
else if(needs_assigned == 2)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/datum/admins/proc/makeOfficial()
|
||||
var/mission = input("Assign a task for the official", "Assign Task", "Conduct a routine preformance review of [station_name()] and its Captain.")
|
||||
var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered to be a Centcom Official?", "pAI")
|
||||
|
||||
@@ -141,12 +141,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(malf.malf_mode_declared && (malf.apcs > 0))
|
||||
stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
|
||||
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
if(isnum(mode.A_timer))
|
||||
stat(null, "[gang_name("A")] Gang Takeover: [max(mode.A_timer, 0)]")
|
||||
if(isnum(mode.B_timer))
|
||||
stat(null, "[gang_name("B")] Gang Takeover: [max(mode.B_timer, 0)]")
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
if(isnum(G.dom_timer))
|
||||
stat(null, "[G.name] Gang Takeover: [max(G.dom_timer, 0)]")
|
||||
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -190,7 +190,7 @@ emp_act
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
if(prob(I.force + min(100,100 - src.health)) && src != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
ticker.mode.remove_gangster(mind, exclude_bosses=1)
|
||||
ticker.mode.remove_gangster(mind)
|
||||
if(bloody) //Apply blood
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
|
||||
@@ -963,7 +963,7 @@
|
||||
H.apply_effect(20, PARALYZE, armor)
|
||||
if(prob(I.force + ((100 - H.health)/2)) && H != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(H.mind)
|
||||
ticker.mode.remove_gangster(H.mind, exclude_bosses=1)
|
||||
ticker.mode.remove_gangster(H.mind)
|
||||
|
||||
if(bloody) //Apply blood
|
||||
if(H.wear_mask)
|
||||
|
||||
@@ -829,12 +829,9 @@ Sorry Giacom. Please don't be mad :(
|
||||
if(statpanel("Status"))
|
||||
if(ticker)
|
||||
if(ticker.mode)
|
||||
if(istype(ticker.mode, /datum/game_mode/gang))
|
||||
var/datum/game_mode/gang/mode = ticker.mode
|
||||
if(isnum(mode.A_timer))
|
||||
stat(null, "[gang_name("A")] Gang Takeover: [max(mode.A_timer, 0)]")
|
||||
if(isnum(mode.B_timer))
|
||||
stat(null, "[gang_name("B")] Gang Takeover: [max(mode.B_timer, 0)]")
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
if(isnum(G.dom_timer))
|
||||
stat(null, "[G.name] Gang Takeover: [max(G.dom_timer, 0)]")
|
||||
|
||||
/mob/living/cancel_camera()
|
||||
..()
|
||||
@@ -864,4 +861,4 @@ Sorry Giacom. Please don't be mad :(
|
||||
|
||||
//used in datum/reagents/reaction() proc
|
||||
/mob/living/proc/get_permeability_protection()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
if(mind && ticker && ticker.mode)
|
||||
ticker.mode.remove_cultist(mind, 0)
|
||||
ticker.mode.remove_revolutionary(mind, 0)
|
||||
ticker.mode.remove_gangster(mind, 0)
|
||||
ticker.mode.remove_gangster(mind, remove_bosses=1)
|
||||
..()
|
||||
@@ -4,7 +4,7 @@
|
||||
regenerate_icons()
|
||||
show_laws(0)
|
||||
if(mind) ticker.mode.remove_revolutionary(mind)
|
||||
if(mind) ticker.mode.remove_gangster(mind)
|
||||
if(mind) ticker.mode.remove_gangster(mind,1,remove_bosses=1)
|
||||
|
||||
/mob/living/silicon/robot/update_hotkey_mode()
|
||||
winset(src, null, "mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0")
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 28 KiB |
@@ -332,6 +332,7 @@
|
||||
#include "code\game\gamemodes\extended\extended.dm"
|
||||
#include "code\game\gamemodes\gang\dominator.dm"
|
||||
#include "code\game\gamemodes\gang\gang.dm"
|
||||
#include "code\game\gamemodes\gang\gang_datum.dm"
|
||||
#include "code\game\gamemodes\gang\gang_pen.dm"
|
||||
#include "code\game\gamemodes\gang\recaller.dm"
|
||||
#include "code\game\gamemodes\malfunction\Malf_Modules.dm"
|
||||
|
||||
Reference in New Issue
Block a user