Removes gangs (#30056)

This commit is contained in:
MoreRobustThanYou
2017-08-31 16:31:49 -04:00
committed by Leo
parent 6ca67d35e4
commit c48def94d8
37 changed files with 36 additions and 2338 deletions

View File

@@ -387,8 +387,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define NUKE_SYNDICATE_BASE 3
#define STATION_DESTROYED_NUKE 4
#define STATION_EVACUATED 5
#define GANG_LOSS 6
#define GANG_TAKEOVER 7
#define BLOB_WIN 8
#define BLOB_NUKE 9
#define BLOB_DESTROYED 10
@@ -424,11 +422,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define GIBTONITE_STABLE 2
#define GIBTONITE_DETONATE 3
//Gangster starting influences
#define GANGSTER_SOLDIER_STARTING_INFLUENCE 5
#define GANGSTER_BOSS_STARTING_INFLUENCE 20
//for obj explosion block calculation
#define EXPLOSION_BLOCK_PROC -1

View File

@@ -18,7 +18,6 @@
#define ROLE_BLOB "blob"
#define ROLE_NINJA "space ninja"
#define ROLE_MONKEY "monkey"
#define ROLE_GANG "gangster"
#define ROLE_ABDUCTOR "abductor"
#define ROLE_REVENANT "revenant"
#define ROLE_DEVIL "devil"
@@ -40,7 +39,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_BLOB = /datum/game_mode/blob,
ROLE_NINJA,
ROLE_MONKEY = /datum/game_mode/monkey,
ROLE_GANG = /datum/game_mode/gang,
ROLE_REVENANT,
ROLE_ABDUCTOR = /datum/game_mode/abduction,
ROLE_DEVIL = /datum/game_mode/devil,

View File

@@ -310,10 +310,6 @@ SUBSYSTEM_DEF(ticker)
flick("station_corrupted",cinematic)
SEND_SOUND(world, sound('sound/effects/ghost.ogg'))
actually_blew_up = FALSE
if("gang war") //Gang Domination (just show the override screen)
cinematic.icon_state = "intro_malf_still"
flick("intro_malf",cinematic)
actually_blew_up = FALSE
sleep(70)
if("fake") //The round isn't over, we're just freaking people out for fun
flick("intro_nuke",cinematic)
@@ -724,10 +720,6 @@ SUBSYSTEM_DEF(ticker)
news_message = "We would like to reassure all employees that the reports of a Syndicate backed nuclear attack on [station_name()] are, in fact, a hoax. Have a secure day!"
if(STATION_EVACUATED)
news_message = "The crew of [station_name()] has been evacuated amid unconfirmed reports of enemy activity."
if(GANG_LOSS)
news_message = "Organized crime aboard [station_name()] has been stamped out by members of our ever vigilant security team. Remember to thank your assigned officers today!"
if(GANG_TAKEOVER)
news_message = "Contact with [station_name()] has been lost after a sophisticated hacking attack by organized criminal elements. Stay vigilant!"
if(BLOB_WIN)
news_message = "[station_name()] was overcome by an unknown biological outbreak, killing all crew on board. Don't let it happen to you! Remember, a clean work station is a safe work station."
if(BLOB_NUKE)

View File

@@ -74,12 +74,7 @@ GLOBAL_LIST_INIT(huds, list(
//MOB PROCS
/mob/proc/reload_huds()
var/gang_huds = list()
if(SSticker.mode)
for(var/datum/gang/G in SSticker.mode.gangs)
gang_huds += G.ganghud
for(var/datum/atom_hud/hud in (GLOB.huds|gang_huds|GLOB.active_alternate_appearances))
for(var/datum/atom_hud/hud in (GLOB.huds|GLOB.active_alternate_appearances))
if(hud && hud.hudusers[src])
hud.add_hud_to(src)

View File

@@ -56,7 +56,6 @@
var/list/antag_datums
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
var/damnation_type = 0
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
var/hasSoul = TRUE // If false, renders the character unable to sell their soul.
@@ -225,10 +224,6 @@
remove_antag_equip()
/datum/mind/proc/remove_gang()
SSticker.mode.remove_gangster(src,0,1,1)
remove_objectives()
/datum/mind/proc/remove_antag_equip()
var/list/Mob_Contents = current.get_contents()
for(var/obj/item/I in Mob_Contents)
@@ -247,14 +242,11 @@
remove_wizard()
remove_cultist()
remove_rev()
remove_gang()
SSticker.mode.update_changeling_icons_removed(src)
SSticker.mode.update_traitor_icons_removed(src)
SSticker.mode.update_wiz_icons_removed(src)
SSticker.mode.update_cult_icons_removed(src)
SSticker.mode.update_rev_icons_removed(src)
if(gang_datum)
gang_datum.remove_gang_hud(src)
/datum/mind/proc/equip_traitor(var/employer = "The Syndicate", var/silent = FALSE)
if(!current)
@@ -324,9 +316,6 @@
if(iscultist(creator))
SSticker.mode.add_cultist(src)
else if(is_gangster(creator))
SSticker.mode.add_gangster(src, creator.mind.gang_datum, TRUE)
else if(is_revolutionary_in_general(creator))
SSticker.mode.add_revolutionary(src)
@@ -381,7 +370,6 @@
"nuclear",
"wizard",
"revolution",
"gang",
"cult",
"clockcult",
"abductor",
@@ -564,46 +552,6 @@
sections["revolution"] = text
/** GANG ***/
text = "gang"
if (SSticker.mode.config_tag=="gang")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
text += "[current.isloyal() ? "<B>MINDSHIELDED</B>" : "not mindshielded"] | "
if(src in SSticker.mode.get_all_gangsters())
text += "<a href='?src=\ref[src];gang=clear'>none</a>"
else
text += "<B>NONE</B>"
if(current && current.client && (ROLE_GANG in current.client.prefs.be_special))
text += " | Enabled in Prefs<BR>"
else
text += " | Disabled in Prefs<BR>"
for(var/datum/gang/G in SSticker.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>"
text += " | 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 += "<a href='?src=\ref[src];gangboss=\ref[G]'>gang leader</a>"
text += "<BR>"
if(GLOB.gang_colors_pool.len)
text += "<a href='?src=\ref[src];gang=new'>Create New Gang</a>"
sections["gang"] = text
/** ABDUCTION **/
text = "abductor"
if(SSticker.mode.config_tag == "abductor")
@@ -1021,73 +969,6 @@
//////////////////// GANG MODE
else if (href_list["gang"])
switch(href_list["gang"])
if("clear")
remove_gang()
message_admins("[key_name_admin(usr)] has de-gang'ed [current].")
log_admin("[key_name(usr)] has de-gang'ed [current].")
if("equip")
switch(SSticker.mode.equip_gang(current,gang_datum))
if(1)
to_chat(usr, "<span class='warning'>Unable to equip territory spraycan!</span>")
if(2)
to_chat(usr, "<span class='warning'>Unable to equip recruitment pen and spraycan!</span>")
if(3)
to_chat(usr, "<span class='warning'>Unable to equip gangtool, pen, and spraycan!</span>")
if("takeequip")
var/list/L = current.get_contents()
for(var/obj/item/pen/gang/pen in L)
qdel(pen)
for(var/obj/item/device/gangtool/gangtool in L)
qdel(gangtool)
for(var/obj/item/toy/crayon/spraycan/gang/SC in L)
qdel(SC)
if("new")
if(GLOB.gang_colors_pool.len)
var/list/names = list("Random") + GLOB.gang_name_pool
var/gangname = input("Pick a gang name.","Select Name") as null|anything in names
if(gangname && GLOB.gang_colors_pool.len) //Check again just in case another admin made max gangs at the same time
if(!(gangname in GLOB.gang_name_pool))
gangname = null
var/datum/gang/newgang = new(null,gangname)
SSticker.mode.gangs += newgang
message_admins("[key_name_admin(usr)] has created the [newgang.name] Gang.")
log_admin("[key_name(usr)] has created the [newgang.name] Gang.")
else if (href_list["gangboss"])
var/datum/gang/G = locate(href_list["gangboss"]) in SSticker.mode.gangs
if(!G || (src in G.bosses))
return
SSticker.mode.remove_gangster(src,0,2,1)
G.bosses[src] = GANGSTER_BOSS_STARTING_INFLUENCE
gang_datum = G
special_role = "[G.name] Gang Boss"
G.add_gang_hud(src)
to_chat(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.")
SSticker.mode.forge_gang_objectives(src)
SSticker.mode.greet_gang(src,0)
else if (href_list["gangster"])
var/datum/gang/G = locate(href_list["gangster"]) in SSticker.mode.gangs
if(!G || (src in G.gangsters))
return
SSticker.mode.remove_gangster(src,0,2,1)
SSticker.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")
@@ -1575,15 +1456,6 @@
fail |= !SSticker.mode.equip_revolutionary(current)
/datum/mind/proc/make_Gang(datum/gang/G)
special_role = "[G.name] Gang Boss"
G.bosses += src
gang_datum = G
G.add_gang_hud(src)
SSticker.mode.forge_gang_objectives(src)
SSticker.mode.greet_gang(src)
SSticker.mode.equip_gang(current,G)
/datum/mind/proc/make_Abductor()
var/role = alert("Abductor Role ?","Role","Agent","Scientist")
var/team = input("Abductor Team ?","Team ?") in list(1,2,3,4)
@@ -1740,4 +1612,4 @@
/mob/living/silicon/pai/mind_initialize()
..()
mind.assigned_role = "pAI"
mind.special_role = ""
mind.special_role = ""

View File

@@ -50,39 +50,4 @@
/datum/mind/proc/leave_all_antag_huds()
for(var/datum/atom_hud/antag/hud in GLOB.huds)
if(hud.hudusers[current])
hud.leave_hud(current)
/datum/atom_hud/antag/gang
var/color = null
/datum/atom_hud/antag/gang/add_to_hud(atom/A)
if(!A)
return
var/image/holder = A.hud_list[ANTAG_HUD]
if(holder)
holder.color = color
..()
/datum/atom_hud/antag/gang/remove_from_hud(atom/A)
if(!A)
return
var/image/holder = A.hud_list[ANTAG_HUD]
if(holder)
holder.color = null
..()
/datum/atom_hud/antag/gang/join_hud(mob/M)
if(!istype(M))
CRASH("join_hud(): [M] ([M.type]) is not a mob!")
var/image/holder = M.hud_list[ANTAG_HUD]
if(holder)
holder.color = color
..()
/datum/atom_hud/antag/gang/leave_hud(mob/M)
if(!istype(M))
CRASH("leave_hud(): [M] ([M.type]) is not a mob!")
var/image/holder = M.hud_list[ANTAG_HUD]
if(holder)
holder.color = null
..()
hud.leave_hud(current)

View File

@@ -281,7 +281,7 @@
intercepttext += "<b>Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \
likely threats to appear in your sector.</b>"
var/list/possible_modes = list()
possible_modes.Add("blob", "changeling", "clock_cult", "cult", "extended", "gang", "malf", "nuclear", "revolution", "traitor", "wizard")
possible_modes.Add("blob", "changeling", "clock_cult", "cult", "extended", "malf", "nuclear", "revolution", "traitor", "wizard")
possible_modes -= name //remove the current gamemode to prevent it from being randomly deleted, it will be readded later
for(var/i in 1 to 6) //Remove a few modes to leave four
@@ -539,7 +539,6 @@
/datum/game_mode/proc/remove_antag_for_borging(datum/mind/newborgie)
SSticker.mode.remove_cultist(newborgie, 0, 0)
SSticker.mode.remove_revolutionary(newborgie, 0)
SSticker.mode.remove_gangster(newborgie, 0, remove_bosses=1)
/datum/game_mode/proc/generate_station_goals()
var/list/possible = list()

View File

@@ -1,230 +0,0 @@
#define DOM_BLOCKED_SPAM_CAP 6
#define DOM_REQUIRED_TURFS 30
#define DOM_HULK_HITS_REQUIRED 10
/obj/machinery/dominator
name = "dominator"
desc = "A visibly sinister device. Looks like you can break it if you hit it enough."
icon = 'icons/obj/machines/dominator.dmi'
icon_state = "dominator"
density = TRUE
anchored = TRUE
layer = HIGH_OBJ_LAYER
max_integrity = 300
integrity_failure = 100
armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 70)
var/datum/gang/gang
var/operating = FALSE //false=standby or broken, true=takeover
var/warned = FALSE //if this device has set off the warning at <3 minutes yet
var/spam_prevention = DOM_BLOCKED_SPAM_CAP //first message is immediate
var/datum/effect_system/spark_spread/spark_system
var/obj/effect/countdown/dominator/countdown
/obj/machinery/dominator/hulk_damage()
return (max_integrity - integrity_failure) / DOM_HULK_HITS_REQUIRED
/proc/dominator_excessive_walls(atom/A)
var/open = FALSE
for(var/turf/T in view(3, A))
if(!isclosedturf(T))
open++
if(open < DOM_REQUIRED_TURFS)
return TRUE
else
return FALSE
/obj/machinery/dominator/tesla_act()
qdel(src)
/obj/machinery/dominator/Initialize()
. = ..()
set_light(2)
GLOB.poi_list |= src
spark_system = new
spark_system.set_up(5, TRUE, src)
countdown = new(src)
update_icon()
/obj/machinery/dominator/examine(mob/user)
..()
if(stat & BROKEN)
return
var/time
if(gang && gang.is_dominating)
time = gang.domination_time_remaining()
if(time > 0)
to_chat(user, "<span class='notice'>Hostile Takeover in progress. Estimated [time] seconds remain.</span>")
else
to_chat(user, "<span class='notice'>Hostile Takeover of [station_name()] successful. Have a great day.</span>")
else
to_chat(user, "<span class='notice'>System on standby.</span>")
to_chat(user, "<span class='danger'>System Integrity: [round((obj_integrity/max_integrity)*100,1)]%</span>")
/obj/machinery/dominator/process()
..()
if(gang && gang.is_dominating)
var/time_remaining = gang.domination_time_remaining()
if(time_remaining > 0)
if(dominator_excessive_walls(src))
gang.domination_timer += 20
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
if(spam_prevention < DOM_BLOCKED_SPAM_CAP)
spam_prevention++
else
gang.message_gangtools("Warning: There are too many walls around your gang's dominator, its signal is being blocked!")
say("Error: Takeover signal is currently blocked! There are too many walls within 3 standard units of this device.")
spam_prevention = 0
return
. = TRUE
playsound(loc, 'sound/items/timer.ogg', 10, 0)
if(!warned && (time_remaining < 180))
warned = TRUE
var/area/domloc = get_area(loc)
gang.message_gangtools("Less than 3 minutes remains in hostile takeover. Defend your dominator at [domloc.map_name]!")
for(var/datum/gang/G in SSticker.mode.gangs)
if(G != gang)
G.message_gangtools("WARNING: [gang.name] Gang takeover imminent. Their dominator at [domloc.map_name] must be destroyed!",1,1)
if(!.)
STOP_PROCESSING(SSmachines, src)
/obj/machinery/dominator/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src, 'sound/effects/bang.ogg', 50, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/machinery/dominator/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
if(.)
if(obj_integrity/max_integrity > 0.66)
if(prob(damage_amount*2))
spark_system.start()
else if(!(stat & BROKEN))
spark_system.start()
update_icon()
/obj/machinery/dominator/update_icon()
cut_overlays()
if(!(stat & BROKEN))
icon_state = "dominator-active"
if(operating)
var/mutable_appearance/dominator_overlay = mutable_appearance('icons/obj/machines/dominator.dmi', "dominator-overlay")
if(gang)
dominator_overlay.color = gang.color_hex
add_overlay(dominator_overlay)
else
icon_state = "dominator"
if(obj_integrity/max_integrity < 0.66)
add_overlay("damage")
else
icon_state = "dominator-broken"
/obj/machinery/dominator/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
set_broken()
/obj/machinery/dominator/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(!(stat & BROKEN))
set_broken()
new /obj/item/stack/sheet/plasteel(src.loc)
qdel(src)
/obj/machinery/dominator/attacked_by(obj/item/I, mob/living/user)
add_fingerprint(user)
..()
/obj/machinery/dominator/proc/set_broken()
if(gang)
gang.is_dominating = FALSE
var/takeover_in_progress = 0
for(var/datum/gang/G in SSticker.mode.gangs)
if(G.is_dominating)
takeover_in_progress = 1
break
if(!takeover_in_progress)
var/was_stranded = SSshuttle.emergency.mode == SHUTTLE_STRANDED
SSshuttle.clearHostileEnvironment(src)
if(!was_stranded)
priority_announce("All hostile activity within station systems has ceased.","Network Alert")
if(get_security_level() == "delta")
set_security_level("red")
gang.message_gangtools("Hostile takeover cancelled: Dominator is no longer operational.[gang.dom_attempts ? " You have [gang.dom_attempts] attempt remaining." : " The station network will have likely blocked any more attempts by us."]",1,1)
set_light(0)
operating = FALSE
stat |= BROKEN
update_icon()
STOP_PROCESSING(SSmachines, src)
/obj/machinery/dominator/Destroy()
if(!(stat & BROKEN))
set_broken()
GLOB.poi_list.Remove(src)
gang = null
QDEL_NULL(spark_system)
QDEL_NULL(countdown)
STOP_PROCESSING(SSmachines, src)
return ..()
/obj/machinery/dominator/emp_act(severity)
take_damage(100, BURN, "energy", 0)
..()
/obj/machinery/dominator/attack_hand(mob/user)
if(operating || (stat & BROKEN))
examine(user)
return
var/datum/gang/tempgang
if(user.mind in SSticker.mode.get_all_gangsters())
tempgang = user.mind.gang_datum
else
examine(user)
return
if(tempgang.is_dominating)
to_chat(user, "<span class='warning'>Error: Hostile Takeover is already in progress.</span>")
return
if(!tempgang.dom_attempts)
to_chat(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 = round(determine_domination_time(tempgang)/60,0.1)
if(alert(user,"With [round((tempgang.territory.len/GLOB.start_state.num_territories)*100, 1)]% station control, a takeover will require [time] minutes.\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((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc))
return 0
var/area/A = get_area(loc)
var/locname = A.map_name
gang = tempgang
gang.dom_attempts --
priority_announce("Network breach detected in [locname]. The [gang.name] Gang is attempting to seize control of the station!","Network Alert")
gang.domination()
SSshuttle.registerHostileEnvironment(src)
name = "[gang.name] Gang [name]"
operating = TRUE
update_icon()
countdown.color = gang.color_hex
countdown.start()
set_light(3)
START_PROCESSING(SSmachines, src)
gang.message_gangtools("Hostile takeover in progress: Estimated [time] minutes until victory.[gang.dom_attempts ? "" : " This is your final attempt."]")
for(var/datum/gang/G in SSticker.mode.gangs)
if(G != gang)
G.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] minutes until our defeat.",1,1)

View File

@@ -1,359 +0,0 @@
//gang.dm
//Gang War Game Mode
GLOBAL_LIST_INIT(gang_name_pool, list("Clandestine", "Prima", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Donk", "Gene", "Gib", "Tunnel", "Diablo", "Psyke", "Osiron", "Sirius", "Sleeping Carp"))
GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","purple", "white"))
GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather, /obj/item/clothing/suit/jacket/leather/overcoat, /obj/item/clothing/suit/jacket/puffer, /obj/item/clothing/suit/jacket/miljacket, /obj/item/clothing/suit/jacket/puffer, /obj/item/clothing/suit/pirate, /obj/item/clothing/suit/poncho, /obj/item/clothing/suit/apron/overalls, /obj/item/clothing/suit/jacket/letterman))
/datum/game_mode
var/list/datum/gang/gangs = list()
var/datum/gang_points/gang_points
/proc/is_gangster(var/mob/living/M)
return istype(M) && M.mind && M.mind.gang_datum
/proc/is_in_gang(var/mob/living/M, var/gang_type)
if(!is_gangster(M) || !gang_type)
return 0
var/datum/gang/G = M.mind.gang_datum
if(G.name == gang_type)
return 1
return 0
/datum/game_mode/gang
name = "gang war"
config_tag = "gang"
antag_flag = ROLE_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_enemies = 2
recommended_enemies = 2
enemy_minimum_age = 14
announce_span = "danger"
announce_text = "A violent turf war has erupted on the station!\n\
<span class='danger'>Gangsters</span>: Take over the station with a dominator.\n\
<span class='notice'>Crew</span>: Prevent the gangs from expanding and initiating takeover."
///////////////////////////////////////////////////////////////////////////////
//Gets the round setup, cancelling if there's not enough players at the start//
///////////////////////////////////////////////////////////////////////////////
/datum/game_mode/gang/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
if(config.protect_assistant_from_antagonist)
restricted_jobs += "Assistant"
//Spawn more bosses depending on server population
var/gangs_to_create = 2
if(prob(num_players() * 2))
gangs_to_create ++
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
for(var/n in 1 to 3)
var/datum/mind/boss = pick(antag_candidates)
antag_candidates -= boss
G.bosses[boss] = GANGSTER_BOSS_STARTING_INFLUENCE
boss.gang_datum = G
var/title
if(n == 1)
title = "Boss"
else
title = "Lieutenant"
boss.special_role = "[G.name] Gang [title]"
boss.restricted_roles = restricted_jobs
log_game("[boss.key] has been selected as the [title] for the [G.name] Gang")
if(gangs.len < 2) //Need at least two gangs
return 0
return 1
/datum/game_mode/gang/post_setup()
set waitfor = FALSE
..()
sleep(rand(10,100))
for(var/datum/gang/G in gangs)
for(var/datum/mind/boss_mind in G.bosses)
G.bosses[boss_mind] = GANGSTER_BOSS_STARTING_INFLUENCE //Force influence to be put on it.
G.add_gang_hud(boss_mind)
forge_gang_objectives(boss_mind)
greet_gang(boss_mind)
equip_gang(boss_mind.current,G)
modePlayer += boss_mind
/datum/game_mode/proc/forge_gang_objectives(datum/mind/boss_mind)
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(datum/mind/boss_mind, you_are=1)
if (you_are)
to_chat(boss_mind.current, "<FONT size=3 color=red><B>You are the Boss of the [boss_mind.gang_datum.name] Gang!</B></FONT>")
boss_mind.announce_objectives()
///////////////////////////////////////////////////////////////////////////
//This equips the bosses with their gear, and makes the clown not clumsy//
///////////////////////////////////////////////////////////////////////////
/datum/game_mode/proc/equip_gang(mob/living/carbon/human/mob, gang)
if(!istype(mob))
return
if (mob.mind)
if (mob.mind.assigned_role == "Clown")
to_chat(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 = new(mob)
var/obj/item/pen/gang/T = new(mob)
var/obj/item/toy/crayon/spraycan/gang/SC = new(mob,gang)
var/obj/item/clothing/glasses/hud/security/chameleon/C = new(mob,gang)
var/list/slots = list (
"backpack" = slot_in_backpack,
"left pocket" = slot_l_store,
"right pocket" = slot_r_store
)
. = 0
var/where = mob.equip_in_one_of_slots(gangtool, slots)
if (!where)
to_chat(mob, "Your Syndicate benefactors were unfortunately unable to get you a Gangtool.")
. += 1
else
gangtool.register_device(mob)
to_chat(mob, "The <b>Gangtool</b> in your [where] will allow you to purchase weapons and equipment, send messages to your gang, and recall the emergency shuttle from anywhere on the station.")
to_chat(mob, "As the gang boss, you can also promote your gang members to <b>lieutenant</b>. Unlike regular gangsters, Lieutenants cannot be deconverted and are able to use recruitment pens and gangtools.")
var/where2 = mob.equip_in_one_of_slots(T, slots)
if (!where2)
to_chat(mob, "Your Syndicate benefactors were unfortunately unable to get you a recruitment pen to start.")
. += 1
else
to_chat(mob, "The <b>recruitment pen</b> in your [where2] will help you get your gang started. Stab unsuspecting crew members with it to recruit them.")
var/where3 = mob.equip_in_one_of_slots(SC, slots)
if (!where3)
to_chat(mob, "Your Syndicate benefactors were unfortunately unable to get you a territory spraycan to start.")
. += 1
else
to_chat(mob, "The <b>territory spraycan</b> in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more influence you get. All gangsters can use these, so distribute them to grow your influence faster.")
var/where4 = mob.equip_in_one_of_slots(C, slots)
if (!where4)
to_chat(mob, "Your Syndicate benefactors were unfortunately unable to get you a chameleon security HUD.")
. += 1
else
to_chat(mob, "The <b>chameleon security HUD</b> in your [where4] will help you keep track of who is mindshield-implanted, and unable to be recruited.")
return .
///////////////////////////////////////////
//Deals with converting players to a gang//
///////////////////////////////////////////
/datum/game_mode/proc/add_gangster(datum/mind/gangster_mind, datum/gang/G, check = 1)
if(!G || (gangster_mind in get_all_gangsters()) || (gangster_mind.enslaved_to && !is_gangster(gangster_mind.enslaved_to)))
if(is_in_gang(gangster_mind.current, G.name) && !(gangster_mind in get_gang_bosses()))
return 3
return 0
if(check && gangster_mind.current.isloyal()) //Check to see if the potential gangster is implanted
return 1
G.gangsters[gangster_mind] = GANGSTER_SOLDIER_STARTING_INFLUENCE
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_act(1, 1)
gangster_mind.current.Stun(100)
if(G.is_deconvertible)
to_chat(gangster_mind.current, "<FONT size=3 color=red><B>You are now a member of the [G.name] Gang!</B></FONT>")
to_chat(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>")
to_chat(gangster_mind.current, "<font color='red'>Their ultimate objective is to take over the station with a Dominator machine.</font>")
to_chat(gangster_mind.current, "<font color='red'>You can identify your bosses by their <b>large, bright [G.color] \[G\] icon</b>.</font>")
gangster_mind.store_memory("You are a member of the [G.name] Gang!")
gangster_mind.current.log_message("<font color='red'>Has been converted to the [G.name] Gang!</font>", INDIVIDUAL_ATTACK_LOG)
gangster_mind.special_role = "[G.name] Gangster"
G.add_gang_hud(gangster_mind)
if(jobban_isbanned(gangster_mind.current, ROLE_GANG))
INVOKE_ASYNC(src, /datum/game_mode.proc/replace_jobbaned_player, gangster_mind.current, ROLE_GANG, ROLE_GANG)
return 2
////////////////////////////////////////////////////////////////////
//Deals with players reverting to neutral (Not a gangster anymore)//
////////////////////////////////////////////////////////////////////
/datum/game_mode/proc/remove_gangster(datum/mind/gangster_mind, beingborged, silent, remove_bosses=0)
var/datum/gang/gang = gangster_mind.gang_datum
for(var/obj/O in gangster_mind.current.contents)
if(istype(O, /obj/item/device/gangtool/soldier))
qdel(O)
if(!gang)
return 0
var/removed
for(var/datum/gang/G in gangs)
if(!G.is_deconvertible && !remove_bosses)
return 0
if(gangster_mind in G.gangsters)
G.reclaim_points(G.gangsters[gangster_mind])
G.gangsters -= gangster_mind
removed = 1
if(remove_bosses && (gangster_mind in G.bosses))
G.reclaim_points(G.bosses[gangster_mind])
G.bosses -= gangster_mind
removed = 1
if(G.tags_by_mind[gangster_mind] && islist(G.tags_by_mind[gangster_mind]))
var/list/tags_cache = G.tags_by_mind[gangster_mind]
for(var/v in tags_cache)
var/obj/effect/decal/cleanable/crayon/gang/c = v
c.set_mind_owner(null)
G.tags_by_mind -= gangster_mind
if(!removed)
return 0
gangster_mind.special_role = null
gangster_mind.gang_datum = null
if(silent < 2)
gangster_mind.current.log_message("<font color='red'>Has reformed and defected from the [gang.name] Gang!</font>", INDIVIDUAL_ATTACK_LOG)
if(beingborged)
if(!silent)
gangster_mind.current.visible_message("The frame beeps contentedly from the MMI before initalizing it.")
to_chat(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("[ADMIN_LOOKUPFLW(gangster_mind.current)] has been borged while being a member of the [gang.name] Gang. They are no longer a gangster.")
else
if(!silent)
gangster_mind.current.Unconscious(100)
gangster_mind.current.visible_message("<FONT size=3><B>[gangster_mind.current] looks like they've given up the life of crime!<B></font>")
to_chat(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>")
gangster_mind.memory = ""
gang.remove_gang_hud(gangster_mind)
return 1
////////////////
//Helper Procs//
////////////////
/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/get_gangsters()
var/list/gangsters = list()
for(var/datum/gang/G in gangs)
gangsters += G.gangsters
return gangsters
/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
/datum/game_mode/proc/shuttle_check()
if(SSshuttle.emergencyNoRecall)
return
var/alive = 0
for(var/mob/living/L in GLOB.player_list)
if(L.stat != DEAD)
alive++
if((alive < (GLOB.joined_player_list.len * 0.4)) && ((SSshuttle.emergency.timeLeft(1) > (SSshuttle.emergencyCallTime * 0.4))))
SSshuttle.emergencyNoRecall = TRUE
SSshuttle.emergency.request(null, set_coefficient = 0.4)
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
/proc/determine_domination_time(var/datum/gang/G)
return max(180,480 - (round((G.territory.len/GLOB.start_state.num_territories)*100, 1) * 9))
//////////////////////////////////////////////////////////////////////
//Announces the end of the game with all relavent information stated//
//////////////////////////////////////////////////////////////////////
/datum/game_mode/proc/auto_declare_completion_gang(datum/gang/winner)
if(!gangs.len)
return
if(!winner)
to_chat(world, "<span class='redtext'>The station was [station_was_nuked ? "destroyed!" : "evacuated before a gang could claim it! The station wins!"]</span><br>")
SSticker.mode_result = "loss - gangs failed takeover"
SSticker.news_report = GANG_LOSS
else
to_chat(world, "<span class='redtext'>The [winner.name] Gang successfully performed a hostile takeover of the station!</span><br>")
SSticker.mode_result = "win - gang domination complete"
SSticker.news_report = GANG_TAKEOVER
for(var/datum/gang/G in gangs)
var/text = "<b>The [G.name] Gang was [winner==G ? "<span class='greenannounce'>victorious</span>" : "<span class='boldannounce'>defeated</span>"] with [round((G.territory.len/GLOB.start_state.num_territories)*100, 1)]% control of the station!</b>"
text += "<br>The [G.name] Gang Bosses were:"
for(var/datum/mind/boss in G.bosses)
text += printplayer(boss, 1)
text += "<br>The [G.name] Gangsters were:"
for(var/datum/mind/gangster in G.gangsters)
text += printplayer(gangster, 1)
text += "<br>"
to_chat(world, text)
//////////////////////////////////////////////////////////
//Handles influence, territories, and the victory checks//
//////////////////////////////////////////////////////////
/datum/gang_points
var/next_point_interval = 1800
var/next_point_time
/datum/gang_points/New()
next_point_time = world.time + next_point_interval
START_PROCESSING(SSobj, src)
/datum/gang_points/process(seconds)
var/list/winners = list() //stores the winners if there are any
for(var/datum/gang/G in SSticker.mode.gangs)
if(world.time > next_point_time)
G.income()
if(G.is_dominating)
if(G.domination_time_remaining() < 0)
winners += G
if(world.time > next_point_time)
next_point_time = world.time + next_point_interval
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
var/datum/gang/G = winners[1]
G.is_dominating = FALSE
SSticker.mode.explosion_in_progress = 1
SSticker.station_explosion_cinematic(1,"gang war", null)
SSticker.mode.explosion_in_progress = 0
SSticker.force_ending = TRUE

View File

@@ -1,333 +0,0 @@
//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/list/tags_by_mind = list() //Assoc list in format of tags_by_mind[mind_of_gangster] = list(tag1, tag2, tag3) where tags are the actual object decals.
var/style
var/fighting_style = "normal"
var/list/territory = list()
var/list/territory_new = list()
var/list/territory_lost = list()
var/recalls = 1
var/dom_attempts = 2
var/inner_outfit
var/outer_outfit
var/datum/atom_hud/antag/gang/ganghud
var/is_deconvertible = TRUE //Can you deconvert normal gangsters from the gang
var/domination_timer
var/is_dominating
var/boss_item_list
var/boss_category_list
var/static/list/boss_items = list(
/datum/gang_item/function/gang_ping,
/datum/gang_item/function/recall,
/datum/gang_item/clothing/under,
/datum/gang_item/clothing/suit,
/datum/gang_item/clothing/hat,
/datum/gang_item/clothing/neck,
/datum/gang_item/clothing/shoes,
/datum/gang_item/clothing/mask,
/datum/gang_item/clothing/hands,
/datum/gang_item/clothing/belt,
/datum/gang_item/weapon/shuriken,
/datum/gang_item/weapon/switchblade,
/datum/gang_item/weapon/improvised,
/datum/gang_item/weapon/ammo/improvised_ammo,
/datum/gang_item/weapon/surplus,
/datum/gang_item/weapon/ammo/surplus_ammo,
/datum/gang_item/weapon/pistol,
/datum/gang_item/weapon/ammo/pistol_ammo,
/datum/gang_item/weapon/sniper,
/datum/gang_item/weapon/ammo/sniper_ammo,
/datum/gang_item/weapon/machinegun,
/datum/gang_item/weapon/uzi,
/datum/gang_item/weapon/ammo/uzi_ammo,
/datum/gang_item/equipment/sharpener,
/datum/gang_item/equipment/spraycan,
/datum/gang_item/equipment/emp,
/datum/gang_item/equipment/c4,
/datum/gang_item/equipment/frag,
/datum/gang_item/equipment/stimpack,
/datum/gang_item/equipment/implant_breaker,
/datum/gang_item/equipment/wetwork_boots,
/datum/gang_item/equipment/pen,
/datum/gang_item/equipment/dominator
)
var/reg_item_list
var/reg_category_list
var/static/list/soldier_items = list(
/datum/gang_item/clothing/under,
/datum/gang_item/clothing/suit,
/datum/gang_item/clothing/hat,
/datum/gang_item/clothing/neck,
/datum/gang_item/clothing/shoes,
/datum/gang_item/clothing/mask,
/datum/gang_item/clothing/hands,
/datum/gang_item/clothing/belt,
/datum/gang_item/weapon/shuriken,
/datum/gang_item/weapon/switchblade,
/datum/gang_item/weapon/improvised,
/datum/gang_item/weapon/ammo/improvised_ammo,
/datum/gang_item/weapon/surplus,
/datum/gang_item/weapon/ammo/surplus_ammo,
/datum/gang_item/weapon/pistol,
/datum/gang_item/weapon/ammo/pistol_ammo,
/datum/gang_item/weapon/sniper,
/datum/gang_item/weapon/ammo/sniper_ammo,
/datum/gang_item/weapon/machinegun,
/datum/gang_item/weapon/uzi,
/datum/gang_item/weapon/ammo/uzi_ammo,
/datum/gang_item/equipment/sharpener,
/datum/gang_item/equipment/spraycan,
/datum/gang_item/equipment/emp,
/datum/gang_item/equipment/c4,
/datum/gang_item/equipment/frag,
/datum/gang_item/equipment/stimpack,
/datum/gang_item/equipment/implant_breaker,
/datum/gang_item/equipment/wetwork_boots,
)
/datum/gang/New(loc,gangname)
if(!GLOB.gang_colors_pool.len)
message_admins("WARNING: Maximum number of gangs have been exceeded!")
throw EXCEPTION("Maximum number of gangs has been exceeded")
return
else
color = pick(GLOB.gang_colors_pool)
GLOB.gang_colors_pool -= color
switch(color)
if("red")
color_hex = "#DA0000"
inner_outfit = pick(/obj/item/clothing/under/color/red, /obj/item/clothing/under/lawyer/red)
if("orange")
color_hex = "#FF9300"
inner_outfit = pick(/obj/item/clothing/under/color/orange, /obj/item/clothing/under/geisha)
if("yellow")
color_hex = "#FFF200"
inner_outfit = pick(/obj/item/clothing/under/color/yellow, /obj/item/clothing/under/burial, /obj/item/clothing/under/suit_jacket/tan)
if("green")
color_hex = "#A8E61D"
inner_outfit = pick(/obj/item/clothing/under/color/green, /obj/item/clothing/under/syndicate/camo, /obj/item/clothing/under/suit_jacket/green)
if("blue")
color_hex = "#00B7EF"
inner_outfit = pick(/obj/item/clothing/under/color/blue, /obj/item/clothing/under/suit_jacket/navy)
if("purple")
color_hex = "#DA00FF"
inner_outfit = pick(/obj/item/clothing/under/color/lightpurple, /obj/item/clothing/under/lawyer/purpsuit)
if("white")
color_hex = "#FFFFFF"
inner_outfit = pick(/obj/item/clothing/under/color/white, /obj/item/clothing/under/suit_jacket/white)
name = (gangname ? gangname : pick(GLOB.gang_name_pool))
GLOB.gang_name_pool -= name
outer_outfit = pick(GLOB.gang_outfit_pool)
ganghud = new()
ganghud.color = color_hex
log_game("The [name] Gang has been created. Their gang color is [color].")
build_item_list()
/datum/gang/proc/build_item_list()
boss_item_list = list()
boss_category_list = list()
for(var/B in boss_items)
var/datum/gang_item/G = new B()
boss_item_list[G.id] = G
var/list/Cat = boss_category_list[G.category]
if(Cat)
Cat += G
else
boss_category_list[G.category] = list(G)
reg_item_list = list()
reg_category_list = list()
for(var/S in soldier_items)
var/datum/gang_item/G = new S()
reg_item_list[G.id] = G
var/list/Cat = reg_category_list[G.category]
if(Cat)
Cat += G
else
reg_category_list[G.category] = list(G)
/datum/gang/proc/add_gang_hud(datum/mind/recruit_mind)
ganghud.join_hud(recruit_mind.current)
SSticker.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)
SSticker.mode.set_antag_hud(defector_mind.current, null)
/datum/gang/proc/domination(modifier=1)
set_domination_time(determine_domination_time(src) * modifier)
is_dominating = TRUE
set_security_level("delta")
/datum/gang/proc/set_domination_time(d)
domination_timer = world.time + (10 * d)
/datum/gang/proc/domination_time_remaining()
var/diff = domination_timer - world.time
return diff / 10
//////////////////////////////////////////// MESSAGING
/datum/gang/proc/message_gangtools(message,beep=1,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)
to_chat(mob, "<span class='[warning ? "warning" : "notice"]'>[icon2html(tool, mob)] [message]</span>")
return
//////////////////////////////////////////// INCOME
/datum/gang/proc/income()
if(!bosses.len)
return
var/added_names = ""
var/lost_names = ""
SSticker.mode.shuttle_check() // See if its time to start wrapping things up
//Re-add territories that were reclaimed, so if they got tagged over, they can still earn income if they tag it back before the next status report
var/list/reclaimed_territories = territory_new & territory_lost
territory |= reclaimed_territories
territory_new -= reclaimed_territories
territory_lost -= reclaimed_territories
//Process lost territories
for(var/area in territory_lost)
if(lost_names != "")
lost_names += ", "
lost_names += "[territory_lost[area]]"
territory -= area
//Calculate and report influence growth
//Process new territories
for(var/area in territory_new)
if(added_names != "")
added_names += ", "
added_names += "[territory_new[area]]"
territory += area
//Report territory changes
var/message = "<b>[src] Gang Status Report:</b>.<BR>*---------*<BR>"
message += "<b>[territory_new.len] new territories:</b><br><i>[added_names]</i><br>"
message += "<b>[territory_lost.len] territories lost:</b><br><i>[lost_names]</i><br>"
//Clear the lists
territory_new = list()
territory_lost = list()
var/control = round((territory.len/GLOB.start_state.num_territories)*100, 1)
var/sbonus = sqrt(LAZYLEN(territory)) // Bonus given to soldier's for the gang's total territory
message += "Your gang now has <b>[control]% control</b> of the station.<BR>*---------*<BR>"
if(is_dominating)
var/seconds_remaining = domination_time_remaining()
var/new_time = max(180, seconds_remaining - (territory.len * 2))
if(new_time < seconds_remaining)
message += "Takeover shortened by [seconds_remaining - new_time] seconds for defending [territory.len] territories.<BR>"
set_domination_time(new_time)
message += "<b>[seconds_remaining] seconds remain</b> in hostile takeover.<BR>"
else
pay_territory_income_to_bosses()
pay_territory_income_to_soldiers(sbonus)
pay_all_clothing_bonuses()
announce_all_influence()
/datum/gang/proc/pay_all_clothing_bonuses()
for(var/datum/mind/mind in gangsters|bosses)
pay_clothing_bonus(mind)
/datum/gang/proc/pay_clothing_bonus(var/datum/mind/gangsta)
var/mob/living/carbon/human/gangbanger = gangsta.current
. = 0
if(!istype(gangbanger) || gangbanger.stat == DEAD) //Dead gangsters aren't influential at all!
return 0
var/static/inner = inner_outfit
var/static/outer = outer_outfit
for(var/obj/item/C in gangbanger.contents)
if(C.type == inner_outfit)
. += 2
continue
else if(C.type == outer_outfit)
. += 2
continue
. += C.gang_contraband_value()
adjust_influence(gangsta, .)
if(.)
announce_to_mind(gangsta, "<span class='notice'>Your influential choice of clothing has increased your influence by [.] points!</span>")
else
announce_to_mind(gangsta, "<span class='warning'>Unfortunately, you have not gained any additional influence from your drab, old, boring clothing. Learn to dress like a gangsta, bro!</span>") //Kek
/datum/gang/proc/pay_soldier_territory_income(datum/mind/soldier, sbonus = 0)
. = 0
. = max(0,round(3 - gangsters[soldier]/10)) + (sbonus) + (get_soldier_territories(soldier)/2)
adjust_influence(soldier, .)
/datum/gang/proc/get_soldier_territories(datum/mind/soldier)
if(!islist(tags_by_mind[soldier])) //They have no tagged territories!
return 0
var/list/tags = tags_by_mind[soldier]
return tags.len
/datum/gang/proc/pay_territory_income_to_soldiers(sbonus = 0)
for(var/datum/mind/soldier in gangsters)
var/returned = pay_soldier_territory_income(soldier)
if(!returned)
announce_to_mind(soldier, "<span class='warning'>You have not gained any influence from territories you personally tagged. Get to work, soldier!</span>")
else
announce_to_mind(soldier, "<span class='notice'>You have gained [returned] influence from [get_soldier_territories(soldier)] territories you have personally tagged.</span>")
/datum/gang/proc/announce_all_influence()
for(var/datum/mind/MG in bosses|gangsters)
announce_total_influence(MG)
/datum/gang/proc/pay_territory_income_to_bosses()
. = 0
for(var/datum/mind/boss_mind in bosses)
var/inc = max(0,round(5 - bosses[boss_mind]/10)) + LAZYLEN(territory)
. += inc
adjust_influence(boss_mind, inc)
announce_to_mind(boss_mind, "<span class='boldnotice'>Your influence has increased by [inc] from your gang holding [LAZYLEN(territory)] territories!</span>")
/datum/gang/proc/get_influence(datum/mind/gangster_mind)
if(gangster_mind in gangsters)
return gangsters[gangster_mind]
if(gangster_mind in bosses)
return bosses[gangster_mind]
/datum/gang/proc/adjust_influence(datum/mind/gangster_mind, amount)
if(gangster_mind in gangsters)
gangsters[gangster_mind] += amount
if(gangster_mind in bosses)
bosses[gangster_mind] += amount
/datum/gang/proc/announce_to_mind(datum/mind/gangster_mind, message)
if(gangster_mind.current && gangster_mind.current.stat != DEAD)
to_chat(gangster_mind.current, message)
/datum/gang/proc/announce_total_influence(datum/mind/gangster_mind)
announce_to_mind(gangster_mind, "<span class='boldnotice'>[name] Gang: You now have a total of [get_influence(gangster_mind)] influence!</span>")
/datum/gang/proc/reclaim_points(amount)
for(var/datum/mind/bawss in bosses)
adjust_influence(bawss, amount/bosses.len)
announce_to_mind(bawss, "<span class='notice'>[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.</span>")

View File

@@ -1,453 +0,0 @@
/datum/gang_item
var/name
var/item_path
var/cost
var/spawn_msg
var/category
var/id
/datum/gang_item/proc/purchase(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool, check_canbuy = TRUE)
if(check_canbuy && !can_buy(user, gang, gangtool))
return FALSE
var/real_cost = get_cost(user, gang, gangtool)
gang.adjust_influence(user.mind, -real_cost)
spawn_item(user, gang, gangtool)
return TRUE
/datum/gang_item/proc/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(item_path)
var/obj/item/O = new item_path(user.loc)
user.put_in_hands(O)
if(spawn_msg)
to_chat(user, spawn_msg)
/datum/gang_item/proc/can_buy(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return gang && (gang.get_influence(user.mind) >= get_cost(user, gang, gangtool)) && can_see(user, gang, gangtool)
/datum/gang_item/proc/can_see(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return TRUE
/datum/gang_item/proc/get_cost(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return cost
/datum/gang_item/proc/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return "([get_cost(user, gang, gangtool)] Influence)"
/datum/gang_item/proc/get_name_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return name
/datum/gang_item/proc/isboss(mob/living/carbon/user, datum/gang/gang)
return user && gang && (user.mind == gang.bosses[1])
/datum/gang_item/proc/get_extra_info(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return
///////////////////
//FUNCTIONS
///////////////////
/datum/gang_item/function
category = "Gangtool Functions:"
cost = 0
/datum/gang_item/function/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return ""
/datum/gang_item/function/gang_ping
name = "Send Message to Gang"
id = "gang_ping"
/datum/gang_item/function/gang_ping/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gangtool)
gangtool.ping_gang(user)
/datum/gang_item/function/recall
name = "Recall Emergency Shuttle"
id = "recall"
/datum/gang_item/function/recall/can_see(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return isboss(user, gang)
/datum/gang_item/function/recall/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gangtool)
gangtool.recall(user)
///////////////////
//CLOTHING
///////////////////
/datum/gang_item/clothing
category = "Purchase Influence-Enhancing Clothes:"
/datum/gang_item/clothing/under
name = "Gang Uniform"
id = "under"
cost = 1
/datum/gang_item/clothing/under/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gang.inner_outfit)
var/obj/item/O = new gang.inner_outfit(user.loc)
user.put_in_hands(O)
to_chat(user, "<span class='notice'> This is your gang's official uniform, wearing it will increase your influence")
/datum/gang_item/clothing/suit
name = "Gang Armored Outerwear"
id = "suit"
cost = 1
/datum/gang_item/clothing/suit/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gang.outer_outfit)
var/obj/item/O = new gang.outer_outfit(user.loc)
O.armor = list(melee = 20, bullet = 35, laser = 10, energy = 10, bomb = 30, bio = 0, rad = 0, fire = 30, acid = 30)
O.desc += " Tailored for the [gang.name] Gang to offer the wearer moderate protection against ballistics and physical trauma."
user.put_in_hands(O)
to_chat(user, "<span class='notice'> This is your gang's official outerwear, wearing it will increase your influence")
/datum/gang_item/clothing/hat
name = "Pimp Hat"
id = "hat"
cost = 16
item_path = /obj/item/clothing/head/collectable/petehat/gang
/obj/item/clothing/head/collectable/petehat/gang
name = "pimpin' hat"
desc = "The undisputed king of style."
/obj/item/clothing/head/collectable/petehat/gang/gang_contraband_value()
return 4
/datum/gang_item/clothing/mask
name = "Golden Death Mask"
id = "mask"
cost = 18
item_path = /obj/item/clothing/mask/gskull
/obj/item/clothing/mask/gskull
name = "golden death mask"
icon_state = "gskull"
desc = "Strike terror, and envy, into the hearts of your enemies."
/obj/item/clothing/mask/gskull/gang_contraband_value()
return 5
/datum/gang_item/clothing/shoes
name = "Bling Boots"
id = "boots"
cost = 22
item_path = /obj/item/clothing/shoes/gang
/obj/item/clothing/shoes/gang
name = "blinged-out boots"
desc = "Stand aside peasants."
icon_state = "bling"
/obj/item/clothing/shoes/gang/gang_contraband_value()
return 6
/datum/gang_item/clothing/neck
name = "Gold Necklace"
id = "necklace"
cost = 9
item_path = /obj/item/clothing/neck/necklace/dope
/datum/gang_item/clothing/hands
name = "Decorative Brass Knuckles"
id = "hand"
cost = 11
item_path = /obj/item/clothing/gloves/gang
/obj/item/clothing/gloves/gang
name = "braggadocio's brass knuckles"
desc = "Purely decorative, don't find out the hard way."
icon_state = "knuckles"
w_class = 3
/obj/item/clothing/gloves/gang/gang_contraband_value()
return 3
/datum/gang_item/clothing/belt
name = "Badass Belt"
id = "belt"
cost = 13
item_path = /obj/item/storage/belt/military/gang
/obj/item/storage/belt/military/gang
name = "badass belt"
icon_state = "gangbelt"
item_state = "gang"
desc = "The belt buckle simply reads 'BAMF'."
storage_slots = 1
/obj/item/storage/belt/military/gang/gang_contraband_value()
return 4
///////////////////
//WEAPONS
///////////////////
/datum/gang_item/weapon
category = "Purchase Weapons:"
/datum/gang_item/weapon/ammo
/datum/gang_item/weapon/ammo/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return "&nbsp;&#8627;" + ..() //this is pretty hacky but it looks nice on the popup
/datum/gang_item/weapon/shuriken
name = "Shuriken"
id = "shuriken"
cost = 3
item_path = /obj/item/throwing_star
/datum/gang_item/weapon/switchblade
name = "Switchblade"
id = "switchblade"
cost = 5
item_path = /obj/item/switchblade
/datum/gang_item/weapon/surplus
name = "Surplus Rifle"
id = "surplus"
cost = 8
item_path = /obj/item/gun/ballistic/automatic/surplus
/datum/gang_item/weapon/ammo/surplus_ammo
name = "Surplus Rifle Ammo"
id = "surplus_ammo"
cost = 5
item_path = /obj/item/ammo_box/magazine/m10mm/rifle
/datum/gang_item/weapon/improvised
name = "Sawn-Off Improvised Shotgun"
id = "sawn"
cost = 6
item_path = /obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawn
/datum/gang_item/weapon/ammo/improvised_ammo
name = "Box of Buckshot"
id = "buckshot"
cost = 5
item_path = /obj/item/storage/box/lethalshot
/datum/gang_item/weapon/pistol
name = "10mm Pistol"
id = "pistol"
cost = 30
item_path = /obj/item/gun/ballistic/automatic/pistol
/datum/gang_item/weapon/ammo/pistol_ammo
name = "10mm Ammo"
id = "pistol_ammo"
cost = 10
item_path = /obj/item/ammo_box/magazine/m10mm
/datum/gang_item/weapon/sniper
name = "Black Market .50cal Sniper Rifle"
id = "sniper"
cost = 40
item_path = /obj/item/gun/ballistic/automatic/sniper_rifle/gang
/datum/gang_item/weapon/ammo/sniper_ammo
name = "Smuggled .50cal Sniper Rounds"
id = "sniper_ammo"
cost = 15
item_path = /obj/item/ammo_box/magazine/sniper_rounds/gang
/datum/gang_item/weapon/ammo/sleeper_ammo
name = "Illicit Tranquilizer Cartridges"
id = "sniper_ammo"
cost = 15
item_path = /obj/item/ammo_box/magazine/sniper_rounds/gang/sleeper
/datum/gang_item/weapon/machinegun
name = "Mounted Machine Gun"
id = "MG"
cost = 50
item_path = /obj/machinery/manned_turret
spawn_msg = "<span class='notice'>The mounted machine gun features enhanced responsiveness. Hold down on the trigger while firing to control where you're shooting.</span>"
/datum/gang_item/weapon/uzi
name = "Uzi SMG"
id = "uzi"
cost = 60
item_path = /obj/item/gun/ballistic/automatic/mini_uzi
/datum/gang_item/weapon/ammo/uzi_ammo
name = "Uzi Ammo"
id = "uzi_ammo"
cost = 40
item_path = /obj/item/ammo_box/magazine/uzim9mm
///////////////////
//EQUIPMENT
///////////////////
/datum/gang_item/equipment
category = "Purchase Equipment:"
/datum/gang_item/equipment/spraycan
name = "Territory Spraycan"
id = "spraycan"
cost = 5
item_path = /obj/item/toy/crayon/spraycan/gang
/datum/gang_item/equipment/sharpener
name = "Sharpener"
id = "whetstone"
cost = 3
item_path = /obj/item/sharpener
/datum/gang_item/equipment/emp
name = "EMP Grenade"
id = "EMP"
cost = 5
item_path = /obj/item/grenade/empgrenade
/datum/gang_item/equipment/c4
name = "C4 Explosive"
id = "c4"
cost = 7
item_path = /obj/item/grenade/plastic/c4
/datum/gang_item/equipment/frag
name = "Fragmentation Grenade"
id = "frag nade"
cost = 18
item_path = /obj/item/grenade/syndieminibomb/concussion/frag
/datum/gang_item/equipment/stimpack
name = "Black Market Stimulants"
id = "stimpack"
cost = 12
item_path = /obj/item/reagent_containers/syringe/stimulants
/datum/gang_item/equipment/implant_breaker
name = "Implant Breaker"
id = "implant_breaker"
cost = 10
item_path = /obj/item/implanter/gang
spawn_msg = "<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>"
/datum/gang_item/equipment/implant_breaker/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(item_path)
var/obj/item/O = new item_path(user.loc, gang) //we need to override this whole proc for this one argument
user.put_in_hands(O)
if(spawn_msg)
to_chat(user, spawn_msg)
/datum/gang_item/equipment/wetwork_boots
name = "Wetwork boots"
id = "wetwork"
cost = 20
item_path = /obj/item/clothing/shoes/combat/gang
/obj/item/clothing/shoes/combat/gang
name = "Wetwork boots"
desc = "A gang's best hitmen are prepared for anything."
permeability_coefficient = 0.01
flags_1 = NOSLIP_1
/datum/gang_item/equipment/pen
name = "Recruitment Pen"
id = "pen"
cost = 50
item_path = /obj/item/pen/gang
spawn_msg = "<span class='notice'>More <b>recruitment pens</b> will allow you to recruit gangsters faster. Only gang leaders can recruit with pens.</span>"
/datum/gang_item/equipment/pen/purchase(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(..())
gangtool.free_pen = FALSE
return TRUE
return FALSE
/datum/gang_item/equipment/pen/get_cost(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gangtool && gangtool.free_pen)
return 0
return ..()
/datum/gang_item/equipment/pen/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gangtool && gangtool.free_pen)
return "(GET ONE FREE)"
return ..()
/datum/gang_item/equipment/gangtool
id = "gangtool"
cost = 10
/datum/gang_item/equipment/gangtool/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
var/item_type
if(gang && isboss(user, gang))
item_type = /obj/item/device/gangtool/spare/lt
if(gang.bosses.len < 3)
to_chat(user, "<span class='notice'><b>Gangtools</b> allow you to promote a gangster to be your Lieutenant, enabling them to recruit and purchase items like you. 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
var/obj/item/device/gangtool/spare/tool = new item_type(user.loc)
user.put_in_hands(tool)
/datum/gang_item/equipment/gangtool/get_name_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gang && isboss(user, gang) && (gang.bosses.len < 3))
return "Promote a Gangster"
return "Spare Gangtool"
/datum/gang_item/equipment/dominator
name = "Station Dominator"
id = "dominator"
cost = 30
item_path = /obj/machinery/dominator
spawn_msg = "<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>"
/datum/gang_item/equipment/dominator/can_buy(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(!gang || !gang.dom_attempts)
return FALSE
return ..()
/datum/gang_item/equipment/dominator/get_name_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(!gang || !gang.dom_attempts)
return ..()
return "<b>[..()]</b>"
/datum/gang_item/equipment/dominator/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(!gang || !gang.dom_attempts)
return "(Out of stock)"
return ..()
/datum/gang_item/equipment/dominator/get_extra_info(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
if(gang)
return "(Estimated Takeover Time: [round(determine_domination_time(gang)/60,0.1)] minutes)"
/datum/gang_item/equipment/dominator/purchase(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
var/area/usrarea = get_area(user.loc)
var/usrturf = get_turf(user.loc)
if(initial(usrarea.name) == "Space" || isspaceturf(usrturf) || usr.z != ZLEVEL_STATION || !usrarea.valid_territory)
to_chat(user, "<span class='warning'>You can only use this on the station!</span>")
return FALSE
for(var/obj/obj in usrturf)
if(obj.density)
to_chat(user, "<span class='warning'>There's not enough room here!</span>")
return FALSE
if(dominator_excessive_walls(user))
to_chat(user, "<span class='warning'>The <b>dominator</b> will not function here! The <b>dominator</b> requires a sizable open space within three standard units so that walls do not interfere with the signal.</span>")
return FALSE
if(!(usrarea.type in gang.territory|gang.territory_new))
to_chat(user, "<span class='warning'>The <b>dominator</b> can be spawned only on territory controlled by your gang!</span>")
return FALSE
return ..()
/datum/gang_item/equipment/dominator/spawn_item(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
new item_path(user.loc)

View File

@@ -1,69 +0,0 @@
/*
* Gang Boss Pens
*/
/obj/item/pen/gang
origin_tech = "materials=2;syndicate=3"
var/cooldown
var/last_used = 0
var/charges = 1
/obj/item/pen/gang/New()
..()
last_used = world.time
/obj/item/pen/gang/attack(mob/living/M, mob/user, stealth = TRUE)
if(!istype(M))
return
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
if(user.mind && (user.mind in SSticker.mode.get_gang_bosses()))
if(..(M,user,1))
if(cooldown)
to_chat(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.
var/datum/gang/G = user.mind.gang_datum
var/recruitable = SSticker.mode.add_gangster(M.mind,G)
switch(recruitable)
if(3)
for(var/obj/O in M.contents)
if(istype(O, /obj/item/device/gangtool/soldier))
to_chat(user, "<span class='warning'>This gangster already has an uplink!</span>")
return
new /obj/item/device/gangtool/soldier(M)
to_chat(user, "<span class='warning'>You inject [M] with a new gangtool!</span>")
cooldown(G)
if(2)
new /obj/item/device/gangtool/soldier(M)
M.Unconscious(100)
cooldown(G)
if(1)
to_chat(user, "<span class='warning'>This mind is resistant to recruitment!</span>")
else
to_chat(user, "<span class='warning'>This mind has already been recruited into a gang!</span>")
return
..()
/obj/item/pen/gang/proc/cooldown(datum/gang/gang)
set waitfor = FALSE
var/cooldown_time = 600+(600*gang.bosses.len) // 1recruiter=2mins, 2recruiters=3mins, 3recruiters=4mins
cooldown = 1
icon_state = "pen_blink"
var/time_passed = world.time - last_used
var/time
for(time=time_passed, time>=cooldown_time, time-=cooldown_time) //get 1 charge every cooldown interval
charges++
charges = max(0,charges-1)
last_used = world.time - time
if(charges)
cooldown_time = 50
sleep(cooldown_time)
cooldown = 0
icon_state = "pen"
var/mob/M = get(src, /mob)
to_chat(M, "<span class='notice'>[icon2html(src, M)] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")

View File

@@ -1,333 +0,0 @@
//gangtool device
/obj/item/device/gangtool
name = "suspicious device"
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 = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
flags_1 = CONDUCT_1
origin_tech = "programming=5;bluespace=2;syndicate=5"
var/datum/gang/gang //Which gang uses this?
var/recalling = 0
var/outfits = 2
var/free_pen = 0
var/promotable = 0
var/list/tags = list()
/obj/item/device/gangtool/Initialize() //Initialize supply point income if it hasn't already been started
..()
if(!SSticker.mode.gang_points)
SSticker.mode.gang_points = new /datum/gang_points(SSticker.mode)
/obj/item/device/gangtool/attack_self(mob/user)
if (!can_use(user))
return
var/dat
if(!gang)
dat += "This device is not registered.<br><br>"
if(user.mind in SSticker.mode.get_gang_bosses())
if(promotable && user.mind.gang_datum.bosses.len < 3)
dat += "Give this device to another member of your organization to use to promote them to Lieutenant.<br><br>"
dat += "If this is meant as a spare device for yourself:<br>"
dat += "<a href='?src=\ref[src];register=1'>Register Device as Spare</a><br>"
else if (promotable)
if(user.mind.gang_datum.bosses.len < 3)
dat += "You have been selected for a promotion!<br>"
dat += "<a href='?src=\ref[src];register=1'>Accept Promotion</a><br>"
else
dat += "No promotions available: All positions filled.<br>"
else
dat += "This device is not authorized to promote.<br>"
else
if(gang.is_dominating)
dat += "<center><font color='red'>Takeover In Progress:<br><B>[gang.domination_time_remaining()] seconds remain</B></font></center>"
var/isboss = (user.mind == gang.bosses[1])
dat += "Registration: <B>[gang.name] Gang [isboss ? "Boss" : "Lieutenant"]</B><br>"
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
dat += "Time until Influence grows: <B>[time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss")]</B><br>"
dat += "<hr>"
for(var/cat in gang.boss_category_list)
dat += "<b>[cat]</b><br>"
for(var/V in gang.boss_category_list[cat])
var/datum/gang_item/G = V
if(!G.can_see(user, gang, src))
continue
var/cost = G.get_cost_display(user, gang, src)
if(cost)
dat += cost + " "
var/toAdd = G.get_name_display(user, gang, src)
if(G.can_buy(user, gang, src))
toAdd = "<a href='?src=\ref[src];purchase=[G.id]'>[toAdd]</a>"
dat += toAdd
var/extra = G.get_extra_info(user, gang, src)
if(extra)
dat += "<br><i>[extra]</i>"
dat += "<br>"
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
var/datum/browser/popup = new(user, "gangtool", "Welcome to GangTool v3.5", 340, 625)
popup.set_content(dat)
popup.open()
/obj/item/device/gangtool/Topic(href, href_list)
if(!can_use(usr))
return
add_fingerprint(usr)
if(href_list["register"])
register_device(usr)
else if(!gang) //Gangtool must be registered before you can use the functions below
return
if(href_list["purchase"])
var/datum/gang_item/G = gang.boss_item_list[href_list["purchase"]]
if(G && G.can_buy(usr, gang, src))
G.purchase(usr, gang, src, FALSE)
attack_self(usr)
/obj/item/device/gangtool/proc/ping_gang(mob/user)
if(!user)
return
var/message = stripped_input(user,"Discreetly send a gang-wide message.","Send Message") as null|text
if(!message || !can_use(user))
return
if(user.z > 2)
to_chat(user, "<span class='info'>[icon2html(src, user)]Error: Station out of range.</span>")
return
var/list/members = list()
members += gang.gangsters
members += gang.bosses
if(members.len)
var/gang_rank = gang.bosses.Find(user.mind)
switch(gang_rank)
if(1)
gang_rank = "Gang Boss"
if(2)
gang_rank = "1st Lieutenant"
if(3)
gang_rank = "2nd Lieutenant"
if(4)
gang_rank = "3rd Lieutenant"
else
gang_rank = "[gang_rank - 1]th Lieutenant"
var/ping = "<span class='danger'><B><i>[gang.name] [gang_rank]</i>: [message]</B></span>"
for(var/datum/mind/ganger in members)
if(ganger.current && (ganger.current.z <= 2) && (ganger.current.stat == CONSCIOUS))
to_chat(ganger.current, ping)
for(var/mob/M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [ping]")
log_talk(user,"GANG: [key_name(user)] Messaged [gang.name] Gang: [message].",LOGSAY)
/obj/item/device/gangtool/proc/register_device(mob/user)
if(gang) //It's already been registered!
return
if((promotable && (user.mind in SSticker.mode.get_gangsters())) || (user.mind in SSticker.mode.get_gang_bosses()))
gang = user.mind.gang_datum
gang.gangtools += src
icon_state = "gangtool-[gang.color]"
if(!(user.mind in gang.bosses))
var/cached_influence = gang.gangsters[user.mind]
SSticker.mode.remove_gangster(user.mind, 0, 2)
gang.bosses[user.mind] = cached_influence
user.mind.gang_datum = gang
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.")
to_chat(user, "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>")
SSticker.mode.forge_gang_objectives(user.mind)
SSticker.mode.greet_gang(user.mind,0)
to_chat(user, "The <b>Gangtool</b> you registered will allow you to purchase weapons and equipment, and send messages to your gang.")
to_chat(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
to_chat(usr, "<span class='warning'>ACCESS DENIED: Unauthorized user.</span>")
/obj/item/device/gangtool/proc/recall(mob/user)
if(!can_use(user))
return 0
if(SSshuttle.emergencyNoRecall)
return 0
if(recalling)
to_chat(usr, "<span class='warning'>Error: Recall already in progress.</span>")
return 0
if(!gang.recalls)
to_chat(usr, "<span class='warning'>Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>")
gang.message_gangtools("[usr] is attempting to recall the emergency shuttle.")
recalling = 1
to_chat(loc, "<span class='info'>[icon2html(src, loc)]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
to_chat(user, "<span class='warning'>[icon2html(src, user)]Emergency shuttle cannot be recalled at this time.</span>")
recalling = 0
return 0
to_chat(loc, "<span class='info'>[icon2html(src, loc)]Shuttle recall order generated. Accessing station long-range communication arrays...</span>")
sleep(rand(100,300))
if(!gang.dom_attempts)
to_chat(user, "<span class='warning'>[icon2html(src, user)]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 != ZLEVEL_STATION) //Shuttle can only be recalled while on station
to_chat(user, "<span class='warning'>[icon2html(src, user)]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 * GLOB.start_state.score(end_state)) < 80) //Shuttle cannot be recalled if the station is too damaged
to_chat(user, "<span class='warning'>[icon2html(src, user)]Error: Station communication systems compromised. Unable to establish connection.</span>")
recalling = 0
return 0
to_chat(loc, "<span class='info'>[icon2html(src, loc)]Comm arrays accessed. Broadcasting recall signal...</span>")
sleep(rand(100,300))
recalling = 0
log_game("[key_name(user)] has tried to recall the shuttle with a gangtool.")
message_admins("[key_name_admin(user)] has tried to recall the shuttle with a gangtool.", 1)
userturf = get_turf(user)
if(userturf.z == ZLEVEL_STATION) //Check one more time that they are on station.
if(SSshuttle.cancelEvac(user))
gang.recalls -= 1
return 1
to_chat(loc, "<span class='info'>[icon2html(src, loc)]No response recieved. Emergency shuttle cannot be recalled at this time.</span>")
return 0
/obj/item/device/gangtool/proc/can_use(mob/living/carbon/human/user)
if(!istype(user))
return 0
if(user.incapacitated())
return 0
if(!(src in user.contents))
return 0
if(!user.mind)
return 0
if(gang && (user.mind in gang.bosses)) //If it's already registered, only let the gang's bosses use this
return 1
else if(user.mind in SSticker.mode.get_all_gangsters()) // For soldiers and potential LT's
return 1
return 0
/obj/item/device/gangtool/spare
outfits = 1
/obj/item/device/gangtool/spare/lt
promotable = 1
///////////// Internal tool used by gang regulars ///////////
/obj/item/device/gangtool/soldier/New(mob/user)
. = ..()
gang = user.mind.gang_datum
gang.gangtools += src
var/datum/action/innate/gang/tool/GT = new
GT.Grant(user, src, gang)
/obj/item/device/gangtool/soldier/attack_self(mob/user)
if (!can_use(user))
return
var/dat
if(gang.is_dominating)
dat += "<center><font color='red'>Takeover In Progress:<br><B>[gang.domination_time_remaining()] seconds remain</B></font></center>"
dat += "Registration: <B>[gang.name] - Foot Soldier</B><br>"
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
dat += "Your Influence: <B>[gang.get_influence(user.mind)]</B><br>"
if(LAZYLEN(tags))
dat += "Your tags generate bonus influence for you.<br> You have tagged the following territories:"
for(var/obj/effect/decal/cleanable/crayon/gang/T in tags)
dat += " [T.territory] -"
else
dat += "You have not personally tagged any territory for your gang. Use a spray can to mark your territory and receive bonus influence."
dat += "<br>Time until Influence grows: <B>[time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss")]</B><br>"
dat += "<hr>"
for(var/cat in gang.reg_category_list)
dat += "<b>[cat]</b><br>"
for(var/V in gang.reg_category_list[cat])
var/datum/gang_item/G = V
if(!G.can_see(user, gang, src))
continue
var/cost = G.get_cost_display(user, gang, src)
if(cost)
dat += cost + " "
var/toAdd = G.get_name_display(user, gang, src)
if(G.can_buy(user, gang, src))
toAdd = "<a href='?src=\ref[src];purchase=[G.id]'>[toAdd]</a>"
dat += toAdd
var/extra = G.get_extra_info(user, gang, src)
if(extra)
dat += "<br><i>[extra]</i>"
dat += "<br>"
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
var/datum/browser/popup = new(user, "gangtool", "Welcome to GangTool v3.5", 340, 625)
popup.set_content(dat)
popup.open()
/obj/item/device/gangtool/soldier/Topic(href, href_list)
if(!can_use(usr))
return
if(href_list["purchase"])
var/datum/gang_item/G = gang.reg_item_list[href_list["purchase"]]
if(G && G.can_buy(usr, gang, src))
G.purchase(usr, gang, src, FALSE)
attack_self(usr)
/datum/action/innate/gang
background_icon_state = "bg_spell"
/datum/action/innate/gang/IsAvailable()
if(!owner.mind || !owner.mind in SSticker.mode.get_all_gangsters())
return 0
return ..()
/datum/action/innate/gang/tool
name = "Personal Gang Tool"
desc = "An implanted gang tool that lets you purchase gear"
background_icon_state = "bg_mime"
button_icon_state = "bolt_action"
var/obj/item/device/gangtool/soldier/GT
/datum/action/innate/gang/tool/Grant(mob/user, obj/reg, datum/gang/G)
. = ..()
GT = reg
button.color = G.color
/datum/action/innate/gang/tool/Activate()
GT.attack_self(owner)

View File

@@ -30,11 +30,6 @@
altogether."
if("extended")
text += "The transmission mostly failed to mention your sector. It is possible that there is nothing in the Syndicate that could threaten your station during this shift."
if("gang")
text += "Cybersun Industries representatives claimed that they, in joint research with the Tiger Cooperative, have made a major breakthrough in brainwashing technology, and have \
made the nanobots that apply the \"conversion\" very small and capable of fitting into usually innocent objects - namely, pens. While they refused to outsource this technology for \
months to come due to its flaws, they reported some as missing but passed it off to carelessness. At Central Command, we don't like mysteries, and we have reason to believe that this \
technology was stolen for anti-Nanotrasen use. Be on the lookout for territory claims and unusually violent crew behavior, applying mindshield implants as necessary."
if("malf")
text += "A large ionospheric anomaly recently passed through your sector. Although physically undetectable, ionospherics tend to have an extreme effect on telecommunications equipment \
as well as artificial intelligence units. Closely observe the behavior of artificial intelligence, and treat any machine malfunctions as purposeful. If necessary, termination of the \

View File

@@ -301,10 +301,6 @@
to_chat(S, "<span class='warning'>This device is attempting to corrupt our entire network; attempting to interact with it is too risky. Aborting.</span>")
return FALSE
/obj/effect/decal/cleanable/crayon/gang/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
to_chat(S, "<span class='warning'>Searching... sensor malfunction! Target lost. Aborting.</span>")
return FALSE
/obj/effect/rune/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
to_chat(S, "<span class='warning'>Searching... sensor malfunction! Target lost. Aborting.</span>")
return FALSE

View File

@@ -97,21 +97,6 @@
var/completion = round(C.get_completion())
return completion
/obj/effect/countdown/dominator
name = "dominator countdown"
text_size = 1
color = "#ff00ff" // Overwritten when the dominator starts
/obj/effect/countdown/dominator/get_value()
var/obj/machinery/dominator/D = attached_to
if(!istype(D))
return
else if(D.gang && D.gang.is_dominating)
var/timer = D.gang.domination_time_remaining()
return timer
else
return "OFFLINE"
/obj/effect/countdown/clockworkgate
name = "gateway countdown"
text_size = 1

View File

@@ -11,9 +11,6 @@
name = e_name
desc = "A [name] vandalizing the station."
if(type == "poseur tag")
type = pick(GLOB.gang_name_pool)
if(alt_icon)
icon = alt_icon
icon_state = type
@@ -25,40 +22,3 @@
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
/obj/effect/decal/cleanable/crayon/gang
layer = HIGH_OBJ_LAYER //Harder to hide
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
var/datum/gang/gang
var/datum/mind/user_mind
var/area/territory
/obj/effect/decal/cleanable/crayon/gang/Initialize(mapload, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0, var/mob/user)
if(!type || !G)
qdel(src)
user_mind = user.mind
territory = get_area(src)
gang = G
var/newcolor = G.color_hex
icon_state = G.name
G.territory_new |= list(territory.type = territory.name)
//If this isn't tagged by a specific gangster there's no bonus income.
set_mind_owner(user_mind)
..(mapload, newcolor, icon_state, e_name, rotation)
/obj/effect/decal/cleanable/crayon/gang/proc/set_mind_owner(datum/mind/mind)
if(istype(user_mind) && istype(gang) && islist(gang.tags_by_mind[user_mind])) //Clear us out of old ownership
gang.tags_by_mind[user_mind] -= src
if(istype(mind))
if(!islist(gang.tags_by_mind[mind]))
gang.tags_by_mind[mind] = list()
gang.tags_by_mind[mind] += src
user_mind = mind
/obj/effect/decal/cleanable/crayon/gang/Destroy()
if(gang)
gang.territory -= territory.type
set_mind_owner(null)
gang.territory_new -= territory.type
gang.territory_lost |= list(territory.type = territory.name)
return ..()

View File

@@ -54,7 +54,6 @@
var/self_contained = TRUE // If it deletes itself when it is empty
var/list/validSurfaces = list(/turf/open/floor)
var/gang = FALSE //For marking territory
var/edible = TRUE // That doesn't mean eating it is a good idea
@@ -278,14 +277,6 @@
else if(drawing in numerals)
temp = "number"
// If a gang member is using a gang spraycan, it'll behave differently
var/gang_mode = FALSE
if(gang && user.mind && user.mind.gang_datum)
gang_mode = TRUE
// discontinue if the area isn't valid for tagging because gang "honour"
if(gang_mode && (!can_claim_for_gang(user, target)))
return
var/graf_rot
if(drawing in oriented)
@@ -307,8 +298,6 @@
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
var/takes_time = !instant
if(gang_mode)
takes_time = TRUE
var/wait_time = 50
if(PAINT_LARGE_HORIZONTAL)
@@ -325,28 +314,21 @@
var/list/turf/affected_turfs = list()
if(actually_paints)
if(gang_mode)
// Double check it wasn't tagged in the meanwhile
if(!can_claim_for_gang(user, target))
return
tag_for_gang(user, target)
affected_turfs += target
else
switch(paint_mode)
if(PAINT_NORMAL)
new /obj/effect/decal/cleanable/crayon(target, paint_color, drawing, temp, graf_rot)
switch(paint_mode)
if(PAINT_NORMAL)
new /obj/effect/decal/cleanable/crayon(target, paint_color, drawing, temp, graf_rot)
affected_turfs += target
if(PAINT_LARGE_HORIZONTAL)
var/turf/left = locate(target.x-1,target.y,target.z)
var/turf/right = locate(target.x+1,target.y,target.z)
if(is_type_in_list(left, validSurfaces) && is_type_in_list(right, validSurfaces))
new /obj/effect/decal/cleanable/crayon(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
affected_turfs += left
affected_turfs += right
affected_turfs += target
if(PAINT_LARGE_HORIZONTAL)
var/turf/left = locate(target.x-1,target.y,target.z)
var/turf/right = locate(target.x+1,target.y,target.z)
if(is_type_in_list(left, validSurfaces) && is_type_in_list(right, validSurfaces))
new /obj/effect/decal/cleanable/crayon(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
affected_turfs += left
affected_turfs += right
affected_turfs += target
else
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
return
else
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
return
if(!instant)
to_chat(user, "<span class='notice'>You finish drawing \the [temp].</span>")
@@ -385,47 +367,6 @@
else
..()
/obj/item/toy/crayon/proc/can_claim_for_gang(mob/user, atom/target)
// Check area validity.
// Reject space, player-created areas, and non-station z-levels.
var/area/A = get_area(target)
if(!A || (A.z != ZLEVEL_STATION) || !A.valid_territory)
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
return FALSE
var/spraying_over = FALSE
for(var/obj/effect/decal/cleanable/crayon/gang/G in target)
spraying_over = TRUE
for(var/obj/machinery/power/apc in target)
to_chat(user, "<span class='warning'>You can't tag an APC.</span>")
return FALSE
var/occupying_gang = territory_claimed(A, user)
if(occupying_gang && !spraying_over)
to_chat(user, "<span class='danger'>[A] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!</span>")
return FALSE
// If you pass the gaunlet of checks, you're good to proceed
return TRUE
/obj/item/toy/crayon/proc/territory_claimed(area/territory, mob/user)
for(var/datum/gang/G in SSticker.mode.gangs)
if(territory.type in (G.territory|G.territory_new))
. = G.name
break
/obj/item/toy/crayon/proc/tag_for_gang(mob/user, atom/target)
//Delete any old markings on this tile, including other gang tags
for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
qdel(old_marking)
var/gangID = user.mind.gang_datum
var/area/territory = get_area(target)
new /obj/effect/decal/cleanable/crayon/gang(target,gangID,"graffiti",0,user)
to_chat(user, "<span class='notice'>You tagged [territory] for your gang!</span>")
/obj/item/toy/crayon/red
icon_state = "crayonred"
paint_color = "#DA0000"
@@ -676,25 +617,6 @@
spray_overlay.color = paint_color
add_overlay(spray_overlay)
/obj/item/toy/crayon/spraycan/gang
//desc = "A modified container containing suspicious paint."
charges = 20
gang = TRUE
pre_noise = FALSE
post_noise = TRUE
/obj/item/toy/crayon/spraycan/gang/New(loc, datum/gang/G)
..()
if(G)
paint_color = G.color_hex
update_icon()
/obj/item/toy/crayon/spraycan/gang/examine(mob/user)
. = ..()
if((user.mind && user.mind.gang_datum) || isobserver(user))
to_chat(user, "This spraycan has been specially modified for tagging territory.")
/obj/item/toy/crayon/spraycan/borg
name = "cyborg spraycan"
desc = "A metallic container containing shiny synthesised paint."

View File

@@ -135,8 +135,6 @@
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
explosion(user,0,2,0) //Cheap explosion imitation because putting prime() here causes runtimes
user.gib(1, 1)
@@ -192,8 +190,6 @@
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
target = user
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [name] at [ADMIN_COORDJMP(src)]",0,1)

View File

@@ -1,55 +0,0 @@
/obj/item/implant/gang
name = "gang implant"
desc = "Makes you a gangster or such."
activated = 0
origin_tech = "materials=2;biotech=4;programming=4;syndicate=3"
var/datum/gang/gang
/obj/item/implant/gang/New(loc,var/setgang)
..()
gang = setgang
/obj/item/implant/gang/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Criminal brainwash implant<BR>
<b>Life:</b> A few seconds after injection.<BR>
<b>Important Notes:</b> Illegal<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that change the host's brain to be loyal to a certain organization.<BR>
<b>Special Features:</b> This device will also emit a small EMP pulse, destroying any other implants within the host's brain.<BR>
<b>Integrity:</b> Implant's EMP function will destroy itself in the process."}
return dat
/obj/item/implant/gang/implant(mob/living/target, mob/user, silent = 0)
if(..())
for(var/obj/item/implant/I in target.implants)
if(I != src)
qdel(I)
if(!target.mind || target.stat == DEAD)
return 0
var/success
if(target.mind in SSticker.mode.get_gangsters())
if(SSticker.mode.remove_gangster(target.mind,0,1))
success = 1 //Was not a gang boss, convert as usual
else
success = 1
if(ishuman(target))
if(!success)
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)
return 0
/obj/item/implanter/gang
name = "implanter (gang)"
/obj/item/implanter/gang/New(loc, gang)
if(!gang)
qdel(src)
return
imp = new /obj/item/implant/gang(src,gang)
..()

View File

@@ -19,19 +19,12 @@
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = 0)
if(..())
if((target.mind in (SSticker.mode.head_revolutionaries | SSticker.mode.get_gang_bosses())))
if((target.mind in (SSticker.mode.head_revolutionaries)))
if(!silent)
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
removed(target, 1)
qdel(src)
return 0
if(target.mind in SSticker.mode.get_gangsters())
SSticker.mode.remove_gangster(target.mind)
if(!silent)
target.visible_message("<span class='warning'>[src] was destroyed in the process!</span>", "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>")
removed(target, 1)
qdel(src)
return 0
if(target.mind in SSticker.mode.revolutionaries)
SSticker.mode.remove_revolutionary(target.mind)
if(!silent)

View File

@@ -440,25 +440,6 @@
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a><i>Head body destroyed!</i></td>"
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
dat += "</table>"
for(var/datum/gang/G in SSticker.mode.gangs)
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: [round((G.territory.len/GLOB.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><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a><i>Gang Boss body destroyed!</i></td>"
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
else
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Boss)</b>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
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>(No Client)</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(SSticker.mode.changelings.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Changelings</B></td><td></td><td></td></tr>"
for(var/datum/mind/changeling in SSticker.mode.changelings)

View File

@@ -112,13 +112,6 @@
message_admins("[key_name(usr)] spawned a blob with base resource gain [strength].")
log_admin("[key_name(usr)] spawned a blob with base resource gain [strength].")
new/datum/round_event/ghost_role/blob(TRUE, strength)
if("gangs")
if(src.makeGangsters())
message_admins("[key_name(usr)] created gangs.")
log_admin("[key_name(usr)] created gangs.")
else
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("centcom")
message_admins("[key_name(usr)] is creating a CentCom response team...")
if(src.makeEmergencyresponseteam())
@@ -822,14 +815,6 @@
else
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=revolutionary;jobban4=\ref[M]'>Revolutionary</a></td>"
//Gangster
if(jobban_isbanned(M, "gangster") || isbanned_dept)
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=gangster;jobban4=\ref[M]'><font color=red>Gangster</font></a></td>"
else
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=gangster;jobban4=\ref[M]'>Gangster</a></td>"
dat += "</tr><tr align='center'>" //Breaking it up so it fits nicer on the screen every 5 entries
//Cultist
if(jobban_isbanned(M, "cultist") || isbanned_dept)
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=cultist;jobban4=\ref[M]'><font color=red>Cultist</font></a></td>"

View File

@@ -17,7 +17,6 @@
<a href='?src=\ref[src];makeAntag=cult'>Make Cult</a><br>
<a href='?src=\ref[src];makeAntag=clockcult'>Make Clockwork Cult</a><br>
<a href='?src=\ref[src];makeAntag=blob'>Make Blob</a><br>
<a href='?src=\ref[src];makeAntag=gangs'>Make Gangsters</a><br>
<a href='?src=\ref[src];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=centcom'>Make CentCom Response Team (Requires Ghosts)</a><br>
@@ -358,43 +357,6 @@
return
/datum/admins/proc/makeGangsters()
var/datum/game_mode/gang/temp = new
if(config.protect_roles_from_antagonist)
temp.restricted_jobs += temp.protected_jobs
if(config.protect_assistant_from_antagonist)
temp.restricted_jobs += "Assistant"
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_GANG in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_GANG) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len >= 2)
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
H = pick(candidates)
if(GLOB.gang_colors_pool.len)
var/datum/gang/newgang = new()
SSticker.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 = pollGhostCandidates("Do you wish to be considered to be a CentCom Official?", "deathsquad")

View File

@@ -970,10 +970,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(istype(H, /datum/atom_hud/antag))
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
for(var/datum/gang/G in SSticker.mode.gangs)
var/datum/atom_hud/antag/H = G.ganghud
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")

View File

@@ -81,8 +81,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
be_special += ROLE_NINJA
if(2048)
be_special += ROLE_MONKEY
if(4096)
be_special += ROLE_GANG
if(16384)
be_special += ROLE_ABDUCTOR

View File

@@ -22,7 +22,6 @@
var/cooldown = 0
var/obj/item/device/flashlight/F = null
var/can_flashlight = 0
var/gang //Is this a gang outfit?
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
//Var modification - PLEASE be careful with this I know who you are and where you live

View File

@@ -162,7 +162,4 @@
desc = "Damn, it feels good to be a gangster."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
item_color = "bling"
/obj/item/clothing/neck/necklace/dope/gang_contraband_value()
return 2
item_color = "bling"

View File

@@ -221,9 +221,6 @@ GLOBAL_PROTECT(exp_to_update)
to_chat(mob,"<span class='notice'>You got: [minutes] [role] EXP!</span>")
if(mob.mind.special_role && !mob.mind.var_edited)
var/trackedrole = mob.mind.special_role
var/gangrole = lookforgangrole(mob.mind.special_role)
if(gangrole)
trackedrole = gangrole
play_records[trackedrole] += minutes
if(announce_changes)
to_chat(src,"<span class='notice'>You got: [minutes] [trackedrole] EXP!</span>")
@@ -265,15 +262,4 @@ GLOBAL_PROTECT(exp_to_update)
prefs.db_flags = text2num(flags_read.item[1])
else if(isnull(prefs.db_flags))
prefs.db_flags = 0 //This PROBABLY won't happen, but better safe than sorry.
return TRUE
//Since each gang is tracked as a different antag type, records need to be generalized or you get up to 57 different possible records
/proc/lookforgangrole(rolecheck)
if(findtext(rolecheck,"Gangster"))
return "Gangster"
else if(findtext(rolecheck,"Gang Boss"))
return "Gang Boss"
else if(findtext(rolecheck,"Gang Lieutenant"))
return "Gang Lieutenant"
else
return FALSE
return TRUE

View File

@@ -308,13 +308,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
..()
if(statpanel("Status"))
if(SSticker.HasRoundStarted())
for(var/datum/gang/G in SSticker.mode.gangs)
if(G.is_dominating)
stat(null, "[G.name] Gang Takeover: [max(G.domination_time_remaining(), 0)]")
if(istype(SSticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/B = SSticker.mode
if(B.message_sent)
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
var/datum/game_mode/blob/B = SSticker.mode
if(B.message_sent)
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"

View File

@@ -737,9 +737,6 @@
if(statpanel("Status"))
if(SSticker && SSticker.mode)
for(var/datum/gang/G in SSticker.mode.gangs)
if(G.is_dominating)
stat(null, "[G.name] Gang Takeover: [max(G.domination_time_remaining(), 0)]")
if(istype(SSticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/B = SSticker.mode
if(B.message_sent)

View File

@@ -2,5 +2,4 @@
if(mind && SSticker.mode)
SSticker.mode.remove_cultist(mind, 0, 0)
SSticker.mode.remove_revolutionary(mind, 0)
SSticker.mode.remove_gangster(mind, remove_bosses=1)
..()

View File

@@ -5,4 +5,3 @@
show_laws(0)
if(mind)
SSticker.mode.remove_revolutionary(mind)
SSticker.mode.remove_gangster(mind,1,remove_bosses=1)

View File

@@ -301,15 +301,6 @@
var/datum/DBQuery/query_round_shuttle_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shuttle_name = '[name]' WHERE id = [GLOB.round_id]")
query_round_shuttle_name.Execute()
// Gangs only have one attempt left if the shuttle has
// docked with the station to prevent suffering from
// endless dominator delays
for(var/datum/gang/G in SSticker.mode.gangs)
if(G.is_dominating)
G.dom_attempts = 0
else
G.dom_attempts = min(1,G.dom_attempts)
if(SHUTTLE_DOCKED)
if(time_left <= ENGINES_START_TIME)

View File

@@ -218,10 +218,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
surplus = 40
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/dangerous/smg/unrestricted
item = /obj/item/gun/ballistic/automatic/c20r/unrestricted
include_modes = list(/datum/game_mode/gang)
/datum/uplink_item/dangerous/machinegun
name = "L6 Squad Automatic Weapon"
desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \
@@ -265,7 +261,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/gun/energy/kinetic_accelerator/crossbow
cost = 12
surplus = 50
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/dangerous/flamethrower
name = "Flamethrower"
@@ -274,7 +270,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/flamethrower/full/tank
cost = 4
surplus = 40
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/dangerous/sword
name = "Energy Sword"
@@ -361,7 +357,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/reagent_containers/spray/chemsprayer/bioterror
cost = 20
surplus = 0
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_weapons/virus_grenade
name = "Fungal Tuberculosis Grenade"
@@ -466,7 +462,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
item = /obj/item/ammo_box/magazine/smgm45
cost = 3
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/ammo/smg/bag
name = ".45 Ammo Duffel Bag"
@@ -607,7 +603,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/sleeping_carp_scroll
cost = 17
surplus = 0
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_weapons/cqc
name = "CQC Manual"
@@ -637,7 +633,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/gun/ballistic/automatic/toy/pistol/riot
cost = 3
surplus = 10
exclude_modes = list(/datum/game_mode/gang)
/datum/uplink_item/stealthy_weapons/sleepy_pen
name = "Sleepy Pen"
@@ -647,7 +642,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
falls asleep, they will be able to move and act."
item = /obj/item/pen/sleepy
cost = 4
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_weapons/soap
name = "Syndicate Soap"
@@ -670,7 +665,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/storage/box/syndie_kit/romerol
cost = 25
cant_discount = TRUE
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_weapons/dart_pistol
name = "Dart Pistol"
@@ -732,7 +727,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
/datum/uplink_item/stealthy_tools/chameleon/nuke
cost = 6
exclude_modes = list()
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_tools/syndigaloshes
@@ -778,7 +772,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
move the projector from their hand. Disguised users move slowly, and projectiles pass over them."
item = /obj/item/device/chameleon
cost = 7
exclude_modes = list(/datum/game_mode/gang)
/datum/uplink_item/stealthy_tools/camera_bug
name = "Camera Bug"
@@ -812,7 +805,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/reagent_containers/syringe/mulligan
cost = 4
surplus = 30
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_tools/emplight
name = "EMP Flashlight"
@@ -840,7 +833,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
//Space Suits and Hardsuits
/datum/uplink_item/suits
category = "Space Suits and Hardsuits"
exclude_modes = list(/datum/game_mode/gang)
surplus = 40
/datum/uplink_item/suits/space_suit
@@ -891,7 +883,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
in electronic devices, subverts intended functions, and easily breaks security mechanisms."
item = /obj/item/card/emag
cost = 6
exclude_modes = list(/datum/game_mode/gang)
/datum/uplink_item/device_tools/toolbox
name = "Full Syndicate Toolbox"
@@ -921,7 +912,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
and other supplies helpful for a field medic."
item = /obj/item/storage/firstaid/tactical
cost = 4
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/device_tools/syndietome
name = "Syndicate Tome"
@@ -1038,7 +1029,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
sends you a small beacon that will teleport the larger beacon to your location upon activation."
item = /obj/item/device/sbeacondrop
cost = 14
exclude_modes = list(/datum/game_mode/gang)
/datum/uplink_item/device_tools/syndicate_bomb
name = "Syndicate Bomb"
@@ -1084,7 +1074,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/item/shield/energy
cost = 16
surplus = 20
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/device_tools/medgun
name = "Medbeam Gun"
@@ -1372,7 +1362,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
you will receive."
item = /obj/item/storage/box/syndicate
cost = 20
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
cant_discount = TRUE
/datum/uplink_item/badass/surplus
@@ -1382,7 +1372,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
item = /obj/structure/closet/crate
cost = 20
player_minimum = 25
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
exclude_modes = list(/datum/game_mode/nuclear)
cant_discount = TRUE
/datum/uplink_item/badass/surplus/spawn_item(turf/loc, obj/item/device/uplink/U)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -472,12 +472,6 @@
#include "code\game\gamemodes\devil\true_devil\_true_devil.dm"
#include "code\game\gamemodes\devil\true_devil\inventory.dm"
#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_items.dm"
#include "code\game\gamemodes\gang\gang_pen.dm"
#include "code\game\gamemodes\gang\recaller.dm"
#include "code\game\gamemodes\malfunction\Malf_Modules.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
#include "code\game\gamemodes\meteor\meteors.dm"
@@ -832,7 +826,6 @@
#include "code\game\objects\items\implants\implant_exile.dm"
#include "code\game\objects\items\implants\implant_explosive.dm"
#include "code\game\objects\items\implants\implant_freedom.dm"
#include "code\game\objects\items\implants\implant_gang.dm"
#include "code\game\objects\items\implants\implant_krav_maga.dm"
#include "code\game\objects\items\implants\implant_loyality.dm"
#include "code\game\objects\items\implants\implant_misc.dm"