Merge pull request #9857 from Ikarrus/gangclimax

Gang Update [Ready]
This commit is contained in:
Razharas
2015-06-13 04:10:51 +03:00
13 changed files with 502 additions and 69 deletions
+209
View File
@@ -0,0 +1,209 @@
/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 = 1
anchored = 1.0
layer = 3.6
var/health = 200
var/gang
var/operating = 0
var/broken = 0
/obj/machinery/dominator/New()
if(!istype(ticker.mode, /datum/game_mode/gang))
qdel(src)
return
SetLuminosity(2)
/obj/machinery/dominator/examine(mob/user)
..()
if(broken)
user << "<span class='danger'>It looks completely busted.</span>"
return
var/datum/game_mode/gang/mode = ticker.mode
var/time = null
if(isnum(mode.A_timer))
time = max(mode.A_timer, 0)
if(isnum(mode.B_timer))
time = max(mode.B_timer, 0)
if(isnum(time))
if(time > 0)
user << "<span class='notice'>Hostile Takeover in progress. Estimated [time] seconds remain.</span>"
else
user << "<span class='notice'>Hostile Takeover of [station_name()] successful. Have a great day.</span>"
else
user << "<span class='notice'>System on standby.</span>"
user << "<span class='danger'>System Integrity: [health/2]%</span>"
/obj/machinery/dominator/proc/healthcheck(var/damage)
var/iconname = "dominator"
if(gang)
iconname += "-[gang]"
SetLuminosity(3)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread
health -= damage
switch(health)
if(101 to INFINITY)
if(prob(damage*2))
sparks.set_up(5, 1, src)
sparks.start()
if(1 to 100)
sparks.set_up(5, 1, src)
sparks.start()
iconname += "-damaged"
if(!broken)
if(health <= 0)
set_broken()
else
icon_state = iconname
if(health <= -50)
new /obj/item/stack/sheet/plasteel(src.loc)
qdel(src)
/obj/machinery/dominator/proc/set_broken()
if(!gang)
return
var/datum/game_mode/gang/mode = ticker.mode
if(gang == "A")
mode.A_timer = "OFFLINE"
if(gang == "B")
mode.B_timer = "OFFLINE"
if(!isnum(mode.A_timer) && !isnum(mode.B_timer))
SSshuttle.emergencyNoEscape = 0
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
SSshuttle.emergency.mode = SHUTTLE_DOCKED
SSshuttle.emergency.timer = world.time
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
else
priority_announce("All hostile activity within station systems have ceased.","Network Alert")
SetLuminosity(0)
icon_state = "dominator-broken"
broken = 1
/obj/machinery/dominator/Destroy()
if(!broken)
set_broken()
..()
/obj/machinery/dominator/emp_act(severity)
healthcheck(100)
..()
/obj/machinery/dominator/ex_act(severity, target)
if(target == src)
qdel(src)
return
switch(severity)
if(1.0)
qdel(src)
if(2.0)
healthcheck(120)
if(3.0)
healthcheck(30)
return
/obj/machinery/dominator/bullet_act(var/obj/item/projectile/Proj)
if(Proj.damage)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
playsound(src, 'sound/effects/bang.ogg', 50, 1)
visible_message("<span class='danger'>[src] was hit by [Proj].</span>")
healthcheck(Proj.damage)
..()
/obj/machinery/dominator/blob_act()
healthcheck(110)
/obj/machinery/dominator/attackby(I as obj, user as mob, params)
return
/obj/machinery/dominator/attack_hand(mob/user)
if(operating||broken)
examine(user)
return
var/datum/game_mode/gang/mode = ticker.mode
var/gang_territory
var/timer
var/tempgang
if(user.mind in (ticker.mode.A_gang|ticker.mode.A_bosses))
tempgang = "A"
gang_territory = ticker.mode.A_territory.len
timer = mode.A_timer
else if(user.mind in (ticker.mode.B_gang|ticker.mode.B_bosses))
tempgang = "B"
gang_territory = ticker.mode.B_territory.len
timer = mode.B_timer
if(!tempgang)
examine(user)
return
if(isnum(timer)) //In theory, this shouldn't happen. But if it does, they get this meme
user << "<span class='warning'>Error: Hostile Takeover is already in progress.</span>"
return
var/time = max(180,900 - ((round((gang_territory/start_state.num_territories)*200, 1) - 60) * 15))
if(alert(user,"With [round((gang_territory/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] seconds.\nThe entire station will likely be alerted once it starts.\nYour gang must be prepared to defend this device throughout the duration.\nAre you ready?","Confirmation","Yes","No") == "Yes")
if ((!in_range(src, user) || !istype(src.loc, /turf)))
return 0
var/area/srcloc = get_area(src.loc)
gang = tempgang
mode.domination(gang,1,srcloc.name)
src.name = "[gang_name(gang)] Gang [src.name]"
healthcheck(0)
operating = 1
/obj/machinery/dominator/attack_alien(mob/living/user)
user.do_attack_animation(src)
playsound(src, 'sound/effects/bang.ogg', 50, 1)
user.visible_message("<span class='danger'>[user] smashes against [src] with its claws.</span>",\
"<span class='danger'>You smash against [src] with your claws.</span>",\
"<span class='italics'>You hear metal scraping.</span>")
healthcheck(15)
/obj/machinery/dominator/attack_animal(mob/living/user as mob)
if(!isanimal(user))
return
var/mob/living/simple_animal/M = user
M.do_attack_animation(src)
if(M.melee_damage_upper <= 0)
return
healthcheck(M.melee_damage_upper)
/obj/machinery/dominator/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
playsound(src, 'sound/effects/bang.ogg', 50, 1)
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
healthcheck(M.force)
return
/obj/machinery/dominator/attack_hulk(mob/user)
playsound(src, 'sound/effects/bang.ogg', 50, 1)
user.visible_message("<span class='danger'>[user] smashes [src].</span>",\
"<span class='danger'>You punch [src].</span>",\
"<span class='italics'>You hear metal being slammed.</span>")
healthcheck(5)
/obj/machinery/dominator/attackby(obj/item/weapon/I as obj, mob/living/user as mob, params)
if(istype(I, /obj/item/weapon))
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if( (I.flags&NOBLUDGEON) || !I.force )
return
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
visible_message("<span class='danger'>[user] has hit \the [src] with [I].</span>")
if(I.damtype == BURN || I.damtype == BRUTE)
healthcheck(I.force)
return
+112 -20
View File
@@ -15,6 +15,10 @@
var/list/A_territory_lost = list()
var/list/B_territory_new = list()
var/list/B_territory_lost = list()
var/gang_A_style
var/gang_A_headgear
var/gang_B_style
var/gang_B_headgear
/datum/game_mode/gang
name = "gang war"
@@ -26,14 +30,15 @@
recommended_enemies = 2
enemy_minimum_age = 14
var/finished = 0
var/goal_scalar = 0.5 //Goal = Total territories x goal_scalar
// Victory timers
var/A_timer = "OFFLINE"
var/B_timer = "OFFLINE"
///////////////////////////
//Announces the game type//
///////////////////////////
/datum/game_mode/gang/announce()
world << "<B>The current game mode is - Gang War!</B>"
world << "<B>A violent turf war has erupted on the station!<BR>Gangsters - Take over the station by claiming more than [round(100*goal_scalar,1)]% of the station! <BR>Crew - The gangs will try to keep you on the station. Successfully evacuate the station to win!</B>"
world << "<B>A violent turf war has erupted on the station!<BR>Gangsters - Take over the station by activating and defending a Dominator! <BR>Crew - The gangs will try to keep you on the station. Successfully evacuate the station to win!</B>"
///////////////////////////////////////////////////////////////////////////////
@@ -73,6 +78,15 @@
modePlayer += B_bosses
..()
/datum/game_mode/gang/process(seconds)
if(!finished)
if(isnum(A_timer))
A_timer -= seconds
if(isnum(B_timer))
B_timer -= seconds
ticker.mode.check_win()
/datum/game_mode/gang/proc/assign_bosses()
var/datum/mind/boss = pick(antag_candidates)
A_bosses += boss
@@ -91,7 +105,7 @@
/datum/game_mode/proc/forge_gang_objectives(var/datum/mind/boss_mind)
var/datum/objective/rival_obj = new
rival_obj.owner = boss_mind
rival_obj.explanation_text = "Claim more than 50% the station before the [(boss_mind in A_bosses) ? gang_name("B") : gang_name("A")] Gang does."
rival_obj.explanation_text = "Preform a hostile takeover of the station with a Dominator."
boss_mind.objectives += rival_obj
@@ -103,6 +117,17 @@
boss_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
/datum/game_mode/gang/proc/domination(var/gang,var/modifier=1,var/dominatorloc)
if(gang=="A")
A_timer = max(180,900 - ((round((ticker.mode.A_territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier
if(gang=="B")
B_timer = max(180,900 - ((round((ticker.mode.B_territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier
if(gang && dominatorloc)
priority_announce("Hostile runtimes detected in all station systems. A network breach by the [gang_name(gang)] Gang has been traced to [dominatorloc].","Network Alert")
if(get_security_level() != "delta")
set_security_level("red")
SSshuttle.emergencyNoEscape = 1
///////////////////////////////////////////////////////////////////////////
//This equips the bosses with their gear, and makes the clown not clumsy//
///////////////////////////////////////////////////////////////////////////
@@ -132,37 +157,107 @@
var/where = mob.equip_in_one_of_slots(gangtool, slots)
if (!where)
mob << "Your Syndicate benefactors were unfortunately unable to get you a Gangtool."
. += 1
else
gangtool.register_device(mob)
mob << "The <b>Gangtool</b> in your [where] will allow you to use your influence to purchase items and prevent the station from evacuating before you can take over. Use it to recall the emergency shuttle from anywhere on the station."
mob << "The <b>Gangtool</b> in your [where] will allow you to purchase items, send messages to your gangsters and to recall the emergency shuttle from anywhere on the station."
mob << "You can also promote your gang members to <b>lieutenant</b> by giving them an unregistered gangtool. Lieutenants cannot be deconverted and are able to use recruitment pens and gangtools."
. += 1
var/where2 = mob.equip_in_one_of_slots(T, slots)
if (!where2)
mob << "Your Syndicate benefactors were unfortunately unable to get you a recruitment pen to start."
. += 1
else
mob << "The <b>recruitment pen</b> in your [where2] will help you get your gang started. Use it on unsuspecting crew members to recruit them."
. += 1
var/where3 = mob.equip_in_one_of_slots(SC, slots)
if (!where3)
mob << "Your Syndicate benefactors were unfortunately unable to get you a territory spraycan to start."
. += 1
else
mob << "The <b>territory spraycan</b> in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more influence you get. Distribute these to your gangsters to grow your influence faster."
. += 1
mob.update_icons()
return .
//Used by recallers when purchasing a gang outfit. First time a gang outfit is purchased the buyer decides a gang style which is stored so gang outfits are uniform
/datum/game_mode/proc/gang_outfit(mob/user,var/obj/item/device/gangtool/gangtool,var/gang)
if(!user || !gangtool || !gang)
return 0
if(!gangtool.can_use(user))
return 0
var/gang_style_list = list("Gang Colors","Leather Jackets","Fine Suits")
var/style
var/headgear
if(gang == "A")
if(!gang_A_style)
gang_A_style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
if(gang_A_style && (alert(user,"Include headgear?","Option","Yes","No") == "Yes"))
gang_A_headgear = 1
style = gang_A_style
headgear = gang_A_headgear
if(gang == "B")
if(!gang_B_style)
gang_B_style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
if(gang_B_style && (alert(user,"Include headgear?","Option","Yes","No") == "Yes"))
gang_B_headgear = 1
style = gang_B_style
headgear = gang_B_headgear
if(!style)
return 0
if(gangtool.can_use(user) && (((gang == "A") ? gang_points.A : gang_points.B) >= 1))
switch(style)
if("Gang Colors")
if(gang == "A")
new /obj/item/clothing/under/color/blue(user.loc)
if(headgear)
new /obj/item/clothing/mask/bandana/blue(user.loc)
if(gang == "B")
new /obj/item/clothing/under/color/red(user.loc)
if(headgear)
new /obj/item/clothing/mask/bandana/red(user.loc)
if("Leather Jackets")
new /obj/item/clothing/suit/jacket/leather(user.loc)
if(headgear)
if(gang == "A")
new /obj/item/clothing/mask/bandana/blue(user.loc)
if(gang == "B")
new /obj/item/clothing/mask/bandana/red(user.loc)
if("Fine Suits")
new /obj/item/clothing/under/suit_jacket/really_black(user.loc)
if(headgear)
new /obj/item/clothing/head/fedora(user.loc)
return 1
return 0
/////////////////////////////////////////////
//Checks if the either gang have won or not//
/////////////////////////////////////////////
/datum/game_mode/gang/check_win()
if(A_territory.len > (start_state.num_territories * goal_scalar))
finished = "A" //Gang A wins
else if(B_territory.len > (start_state.num_territories * goal_scalar))
finished = "B" //Gang B wins
var/winner = 0
if(isnum(A_timer))
if(A_timer < 0)
winner += 1
if(isnum(B_timer))
if(B_timer < 0)
winner += 2
if(winner)
if(winner == 3) //Edge Case: If both dominators activate at the same time
domination("A",0.5)
domination("B",0.5)
priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting hostile runtimes have delayed both attempts.","Network Alert")
else if(winner == 1)
finished = "A" //Gang A wins
else if(winner == 2)
finished = "B" //Gang B wins
///////////////////////////////
//Checks if the round is over//
@@ -282,7 +377,7 @@
if(!finished)
world << "<FONT size=3 color=red><B>The station was [station_was_nuked ? "destroyed!" : "evacuated before either gang could claim it!"]</B></FONT>"
else
world << "<FONT size=3 color=red><B>The [finished=="A" ? gang_name("A") : gang_name("B")] Gang has claimed over [round(100*goal_scalar,1)]% of the station and has assumed control!</B></FONT>"
world << "<FONT size=3 color=red><B>The [finished=="A" ? gang_name("A") : gang_name("B")] Gang successfully preformed a hostile takeover of the station!!</B></FONT>"
..()
return 1
@@ -338,8 +433,8 @@
//////////////////////////////////////////////////////////
/datum/gang_points
var/A = 30
var/B = 30
var/A = 25
var/B = 25
var/next_point_interval = 1800
var/next_point_time
@@ -429,12 +524,9 @@
var/A_control = round((ticker.mode.A_territory.len/start_state.num_territories)*100, 1)
var/B_control = round((ticker.mode.B_territory.len/start_state.num_territories)*100, 1)
ticker.mode.message_gangtools((ticker.mode.A_tools),"Your gang now has <b>[A_control]% control</b> of the station.",0)
ticker.mode.message_gangtools((ticker.mode.A_tools),"The [gang_name("B")] Gang has <b>[B_control]% control</b> of the station.",0,1)
//ticker.mode.message_gangtools((ticker.mode.A_tools),"The [gang_name("B")] Gang has <b>[B_control]% control</b> of the station.",0,1)
ticker.mode.message_gangtools((ticker.mode.B_tools),"Your gang now has <b>[B_control]% control</b> of the station.",0)
ticker.mode.message_gangtools((ticker.mode.B_tools),"The [gang_name("A")] Gang has <b>[A_control]% control</b> of the station.",0,1)
//Victory check
ticker.mode.check_win()
//ticker.mode.message_gangtools((ticker.mode.B_tools),"The [gang_name("A")] Gang has <b>[A_control]% control</b> of the station.",0,1)
//Restart the counter
start()
@@ -2,7 +2,7 @@
/obj/item/device/gangtool
name = "suspicious device"
desc = "A strange device of sorts. Hard to really make out what it actually does just by looking."
icon_state = "recaller"
icon_state = "gangtool"
item_state = "walkietalkie"
throwforce = 0
w_class = 1.0
@@ -33,30 +33,28 @@
else
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
else
var/datum/game_mode/gang/gangmode
if(istype(ticker.mode, /datum/game_mode/gang))
gangmode = ticker.mode
var/gang_size = ((gang == "A")? (ticker.mode.A_gang.len + ticker.mode.A_bosses.len) : (ticker.mode.B_gang.len + ticker.mode.B_bosses.len))
var/gang_territory = ((gang == "A")? ticker.mode.A_territory.len : ticker.mode.B_territory.len)
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
var/timer
if(gangmode)
timer = ((gang == "A") ? gangmode.A_timer : gangmode.B_timer)
if(isnum(timer))
dat += "<center><font color='red'>Takeover In Progress:<br><B>[timer] seconds remain</B></font></center><hr>"
dat += "Registration: <B>[(gang == "A")? gang_name("A") : gang_name("B")] Gang [boss ? "Administrator" : "Lieutenant"]</B><br>"
dat += "Organization Size: <B>[gang_size]</B><br>"
dat += "Station Control: <B>[round((gang_territory/start_state.num_territories)*100, 1)]%</B><br>"
dat += "Organization Size: <B>[gang_size]</B> | Station Control: <B>[round((gang_territory/start_state.num_territories)*100, 1)]%</B><br>"
dat += "<a href='?src=\ref[src];choice=ping'>Send Gang-wide Message</a><br>"
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
dat += "<br>"
dat += "Influence: <B>[points]</B><br>"
dat += "Time until Influence grows: <B>[(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
dat += "<B>Purchase Items:</B><br>"
dat += "(5 Influence) "
if(points >= 5)
dat += "<a href='?src=\ref[src];choice=ping'>Send Gang-wide Message</a><br>"
else
dat += "Send Gang-wide Message<br>"
dat += "(10 Influence) "
if(points >= 10)
dat += "<a href='?src=\ref[src];purchase=spraycan'><b>Territory Spraycan</b></a><br>"
else
dat += "<b>Territory Spraycan</b><br>"
dat += "Time until Influence grows: <B>[(points >= 999) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
dat += "<hr>"
dat += "<B>Purchase Weapons:</B><br>"
dat += "(10 Influence) "
if(points >= 10)
@@ -64,8 +62,8 @@
else
dat += "Switchblade<br>"
dat += "(25 Influence) "
if(points >= 25)
dat += "(20 Influence) "
if(points >= 20)
dat += "<a href='?src=\ref[src];purchase=pistol'>10mm Pistol</a><br>"
else
dat += "10mm Pistol<br>"
@@ -76,8 +74,35 @@
else
dat += "10mm Ammo<br>"
dat += "(40 Influence) "
if(points >= 40)
dat += "(50 Influence) "
if(points >= 50)
dat += "<a href='?src=\ref[src];purchase=SMG'>Thompson SMG</a><br>"
else
dat += "Thompson SMG<br>"
dat += "<br>"
dat += "<B>Purchase Utilities:</B><br>"
dat += "(10 Influence) "
if(points >= 10)
dat += "<a href='?src=\ref[src];purchase=spraycan'><b>Territory Spraycan</b></a><br>"
else
dat += "<b>Territory Spraycan</b><br>"
dat += "(1 Influence) "
if(points >= 1)
dat += "<a href='?src=\ref[src];purchase=outfit'>Gang Outfit</a><br>"
else
dat += "<b>Gang Outfit</b><br>"
dat += "(10 Influence) "
if(points >= 10)
dat += "<a href='?src=\ref[src];purchase=vest'>Bulletproof Vest</a><br>"
else
dat += "<b>Bulletproof Vest</b><br>"
dat += "(30 Influence) "
if(points >= 30)
dat += "<a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
else
dat += "Recruitment Pen<br>"
@@ -91,14 +116,23 @@
dat += "<a href='?src=\ref[src];purchase=gangtool'>Promote a Gangster</a><br>"
else
dat += "Promote a Gangster<br>"
if(gangmode)
dat += "(50 Influence) "
if(points >= 50)
dat += "<a href='?src=\ref[src];purchase=dominator'><b>Station Dominator</b></a><br>"
dat += "<i>(Estimated Takeover Time: [round(max(180,900 - ((round((gang_territory/start_state.num_territories)*200, 10) - 60) * 15))/60,1)] minutes)</i><br>"
else
dat += "Station Dominator<br>"
dat += "<br>"
dat += "<a href='?src=\ref[src];choice=refresh'>Refresh</a><br>"
var/datum/browser/popup = new(user, "gangtool", "Welcome to GangTool v0.4")
var/datum/browser/popup = new(user, "gangtool", "Welcome to GangTool v0.4", 350, 550)
popup.set_content(dat)
popup.open()
/obj/item/device/gangtool/Topic(href, href_list)
if(!can_use(usr))
return
@@ -115,6 +149,10 @@
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
var/item_type
switch(href_list["purchase"])
if("outfit")
if(points >= 1)
item_type = ticker.mode.gang_outfit(usr,src,gang)
points = 1
if("spraycan")
if(points >= 10)
item_type = /obj/item/toy/crayon/spraycan/gang
@@ -124,31 +162,60 @@
item_type = /obj/item/weapon/switchblade
points = 10
if("pistol")
if(points >= 25)
if(points >= 20)
item_type = /obj/item/weapon/gun/projectile/automatic/pistol
points = 25
points = 20
if("ammo")
if(points >= 10)
item_type = /obj/item/ammo_box/magazine/m10mm
points = 10
if("SMG")
if(points >= 50)
item_type = /obj/item/weapon/gun/projectile/automatic/tommygun
points = 50
if("vest")
if(points >= 10)
item_type = /obj/item/clothing/suit/armor/bulletproof
points = 10
if("pen")
if(points >= 40)
if(points >= 30)
item_type = /obj/item/weapon/pen/gang
points = 40
points = 30
if("gangtool")
if((promotions < 3) && (points >= (promotions*20)+10))
item_type = /obj/item/device/gangtool/lt
points = (promotions*20)+10
promotions++
if("dominator")
if(istype(ticker.mode, /datum/game_mode/gang))
var/datum/game_mode/gang/mode = ticker.mode
if(isnum((gang == "A") ? mode.A_timer : mode.B_timer))
return
var/fail = 0
var/usrarea = get_area(usr.loc)
var/usrturf = get_turf(usr.loc)
if(istype(usrarea,/area/space) || istype(usrturf,/turf/space) || usr.z != 1)
usr << "<span class='warning'>You can only use this on the station!</span>"
fail = 1
for(var/obj/obj in usrturf)
if(obj.density)
usr << "<span class='warning'>There's not enough room here!</span>"
fail = 1
break
if(!fail && points >= 50)
item_type = /obj/machinery/dominator
points = 50
if(item_type)
if(gang == "A")
ticker.mode.gang_points.A -= points
else if(gang == "B")
ticker.mode.gang_points.B -= points
var/obj/purchased = new item_type(get_turf(usr))
var/mob/living/carbon/human/H = usr
H.put_in_any_hand_if_possible(purchased)
if(ispath(item_type))
var/obj/purchased = new item_type(get_turf(usr))
var/mob/living/carbon/human/H = usr
H.put_in_any_hand_if_possible(purchased)
ticker.mode.message_gangtools(((gang=="A")? ticker.mode.A_tools : ticker.mode.B_tools), "A [href_list["purchase"]] was purchased by [usr] for [points] Influence.")
log_game("A [href_list["purchase"]] was purchased by [key_name(usr)] for [points] Influence.")
@@ -172,18 +239,16 @@
return
var/list/members = list()
if(gang == "A")
if(ticker.mode.gang_points.A >= 5)
members += ticker.mode.A_bosses | ticker.mode.A_gang
ticker.mode.gang_points.A -= 5
members += ticker.mode.A_bosses | ticker.mode.A_gang
else if(gang == "B")
if(ticker.mode.gang_points.B >= 5)
members += ticker.mode.B_bosses | ticker.mode.B_gang
ticker.mode.gang_points.B -= 5
members += ticker.mode.B_bosses | ticker.mode.B_gang
if(members.len)
var/ping = "<b>[boss ? "Gang Boss" : "Gang Lieutenant"]:</b> [message]"
for(var/datum/mind/ganger in members)
if(ganger.current.z <= 2)
ganger.current << "<span class='danger'><b>BOSS:</b> [message]</span>"
message_admins("[key_name_admin(user)] sent a global message to the [gang_name(gang)] Gang ([gang]): [message].")
ganger.current << "<span class='danger'>[ping]</span>"
for(var/mob/M in dead_mob_list)
M << "<span class='danger'><B>[gang_name(gang)]</B> [ping]</span>"
log_game("[key_name(user)] sent a global message to the [gang_name(gang)] Gang ([gang]): [message].")
@@ -196,6 +261,7 @@
if(user.mind in (ticker.mode.A_gang | ticker.mode.A_bosses))
ticker.mode.A_tools += src
gang = "A"
icon_state = "gangtool-a"
if(!(user.mind in ticker.mode.A_bosses))
ticker.mode.remove_gangster(user.mind, 0, 2)
ticker.mode.A_bosses += user.mind
@@ -206,6 +272,7 @@
else if(user.mind in (ticker.mode.B_gang | ticker.mode.B_bosses))
ticker.mode.B_tools += src
gang = "B"
icon_state = "gangtool-b"
if(!(user.mind in ticker.mode.B_bosses))
ticker.mode.remove_gangster(user.mind, 0, 2)
ticker.mode.B_bosses += user.mind
@@ -218,7 +285,7 @@
user << "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>"
ticker.mode.forge_gang_objectives(user.mind)
ticker.mode.greet_gang(user.mind,0)
user << "The <b>Gangtool</b> you registered will allow you to use your gang's influence to purchase items and prevent the station from evacuating before your gang can take over. Use it to recall the emergency shuttle from anywhere on the station."
user << "The <b>Gangtool</b> you registered will allow you to purchase items, send messages to your gangsters and to recall the emergency shuttle from anywhere on the station."
user << "You may also now use <b>recruitment pens</b> to grow your gang membership. Use them on unsuspecting crew members to recruit them."
if(!gang)
usr << "<span class='warning'>ACCESS DENIED: Unauthorized user.</span>"
+3 -7
View File
@@ -97,10 +97,7 @@
/obj/item/toy/crayon/spraycan/New()
..()
if(gang)
name = "Modified Paint Applicator"
else
name = "NanoTrasen-brand Rapid Paint Applicator"
name = "spray can"
update_icon()
/obj/item/toy/crayon/spraycan/examine(mob/user)
@@ -116,7 +113,7 @@
if("Toggle Cap")
user << "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>"
capped = capped ? 0 : 1
icon_state = "spraycan[gang ? "_gang" : ""][capped ? "_cap" : ""]"
icon_state = "spraycan[capped ? "_cap" : ""]"
update_icon()
if("Change Drawing")
..()
@@ -155,8 +152,7 @@
overlays += I
/obj/item/toy/crayon/spraycan/gang
desc = "A suspicious-looking spraycan modified to use special paint used by gangsters to mark territory."
icon_state = "spraycan_gang_cap"
desc = "A modified container containing suspicious paint."
gang = 1
uses = 20
instant = -1
@@ -141,6 +141,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(malf.malf_mode_declared && (malf.apcs > 0))
stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
if(istype(ticker.mode, /datum/game_mode/gang))
var/datum/game_mode/gang/mode = ticker.mode
if(isnum(mode.A_timer))
stat(null, "[gang_name("A")] Gang Takeover: [max(mode.A_timer, 0)]")
if(isnum(mode.B_timer))
stat(null, "[gang_name("B")] Gang Takeover: [max(mode.B_timer, 0)]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
set name = "Re-enter Corpse"
+13 -1
View File
@@ -817,6 +817,18 @@ Sorry Giacom. Please don't be mad :(
/mob/living/proc/get_standard_pixel_y_offset(lying = 0)
return initial(pixel_y)
/mob/living/Stat()
..()
if(statpanel("Status"))
if(ticker)
if(ticker.mode)
if(istype(ticker.mode, /datum/game_mode/gang))
var/datum/game_mode/gang/mode = ticker.mode
if(isnum(mode.A_timer))
stat(null, "[gang_name("A")] Gang Takeover: [max(mode.A_timer, 0)]")
if(isnum(mode.B_timer))
stat(null, "[gang_name("B")] Gang Takeover: [max(mode.B_timer, 0)]")
/mob/living/cancel_camera()
..()
cameraFollow = null
@@ -840,5 +852,5 @@ Sorry Giacom. Please don't be mad :(
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
if(!near_camera(src))
return 0
return 1
@@ -230,10 +230,11 @@
return
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "tommy gun"
name = "thompson SMG"
desc = "A genuine 'Chicago Typewriter'."
icon_state = "tommygun"
item_state = "shotgun"
w_class = 5
slot_flags = 0
origin_tech = "combat=5;materials=1;syndicate=2"
mag_type = /obj/item/ammo_box/magazine/tommygunm45
+2 -1
View File
@@ -6,7 +6,8 @@
if(type == "Priority")
announcement += "<h1 class='alert'>Priority Announcement</h1>"
if (title && length(title) > 0)
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
else if(type == "Captain")
announcement += "<h1 class='alert'>Captain Announces</h1>"
news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
+47
View File
@@ -0,0 +1,47 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# spellcheck (typo fixes)
# experiment
# tgs (TG-ported fixes?)
#################################
# Your name.
author: Ikarrus
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- experiment: "<B>Gang Updates</b>"
- rscadd: "New objective: To win, Gangs must now buy a Dominator machine (50 influence) and defend it for a varying time frame.<br>\
* The location of the dominator is broadcasted to the entire station the moment it is activated<br>\
* The more territories the gang controls, the less time it will take<br>\
* Gangs no longer win by capturing territories"
- rscadd: "A choice of gang outfits are now purchasable for 1 influence each"
- rscadd: "Thompson SMGs aka \"tommy guns\" are now purchasable for 50 influence"
- rscadd: "Bulletproof armor vests are now purchasable for 10 influence"
- tweak: "Gang messages are now free to send"
- tweak: "Prices of pistols and pens reduced to 20 and 30, respectively"
- tweak: "Gang spraycans have been made a lot less obvious. They look nearly identical to regular ones, now."
- rscdel: "Gangs will no longer be notified how much territory the enemy controls"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

+2 -1
View File
@@ -325,7 +325,9 @@
#include "code\game\gamemodes\cult\runes.dm"
#include "code\game\gamemodes\cult\talisman.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\recaller.dm"
#include "code\game\gamemodes\malfunction\Malf_Modules.dm"
#include "code\game\gamemodes\malfunction\malfunction.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
@@ -578,7 +580,6 @@
#include "code\game\objects\items\devices\pipe_painter.dm"
#include "code\game\objects\items\devices\pizza_bomb.dm"
#include "code\game\objects\items\devices\powersink.dm"
#include "code\game\objects\items\devices\recaller.dm"
#include "code\game\objects\items\devices\scanners.dm"
#include "code\game\objects\items\devices\sensor_device.dm"
#include "code\game\objects\items\devices\taperecorder.dm"