diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm new file mode 100644 index 00000000000..4fbae44af79 --- /dev/null +++ b/code/game/gamemodes/gang/dominator.dm @@ -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 << "It looks completely busted." + 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 << "Hostile Takeover in progress. Estimated [time] seconds remain." + else + user << "Hostile Takeover of [station_name()] successful. Have a great day." + else + user << "System on standby." + user << "System Integrity: [health/2]%" + + +/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("[src] was hit by [Proj].") + 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 << "Error: Hostile Takeover is already in progress." + 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("[user] smashes against [src] with its claws.",\ + "You smash against [src] with your claws.",\ + "You hear metal scraping.") + 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("[M.name] has hit [src].") + healthcheck(M.force) + return + +/obj/machinery/dominator/attack_hulk(mob/user) + playsound(src, 'sound/effects/bang.ogg', 50, 1) + user.visible_message("[user] smashes [src].",\ + "You punch [src].",\ + "You hear metal being slammed.") + 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("[user] has hit \the [src] with [I].") + if(I.damtype == BURN || I.damtype == BRUTE) + healthcheck(I.force) + return diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 6967dc894c7..97ed4eecbcd 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -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 << "The current game mode is - Gang War!" - world << "A violent turf war has erupted on the station!
Gangsters - Take over the station by claiming more than [round(100*goal_scalar,1)]% of the station!
Crew - The gangs will try to keep you on the station. Successfully evacuate the station to win!
" + world << "A violent turf war has erupted on the station!
Gangsters - Take over the station by activating and defending a Dominator!
Crew - The gangs will try to keep you on the station. Successfully evacuate the station to win!
" /////////////////////////////////////////////////////////////////////////////// @@ -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 << "Objective #[obj_count]: [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 Gangtool in your [where] will allow you to use your influence to purchase items and prevent the station from evacuating before you can take over. Use it to recall the emergency shuttle from anywhere on the station." + mob << "The Gangtool 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 lieutenant by giving them an unregistered gangtool. Lieutenants cannot be deconverted and are able to use recruitment pens and gangtools." - . += 1 var/where2 = mob.equip_in_one_of_slots(T, slots) if (!where2) mob << "Your Syndicate benefactors were unfortunately unable to get you a recruitment pen to start." + . += 1 else mob << "The recruitment pen 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 territory spraycan in your [where3] can be used to claim areas of the station for your gang. The more territory your gang controls, the more influence you get. 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 << "The station was [station_was_nuked ? "destroyed!" : "evacuated before either gang could claim it!"]" else - world << "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!" + world << "The [finished=="A" ? gang_name("A") : gang_name("B")] Gang successfully preformed a hostile takeover of the station!!" ..() 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 [A_control]% control of the station.",0) - ticker.mode.message_gangtools((ticker.mode.A_tools),"The [gang_name("B")] Gang has [B_control]% control of the station.",0,1) + //ticker.mode.message_gangtools((ticker.mode.A_tools),"The [gang_name("B")] Gang has [B_control]% control of the station.",0,1) ticker.mode.message_gangtools((ticker.mode.B_tools),"Your gang now has [B_control]% control of the station.",0) - ticker.mode.message_gangtools((ticker.mode.B_tools),"The [gang_name("A")] Gang has [A_control]% control 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 [A_control]% control of the station.",0,1) //Restart the counter start() diff --git a/code/game/objects/items/devices/recaller.dm b/code/game/gamemodes/gang/recaller.dm similarity index 72% rename from code/game/objects/items/devices/recaller.dm rename to code/game/gamemodes/gang/recaller.dm index de3f046635c..addef28d740 100644 --- a/code/game/objects/items/devices/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -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 += "Register Device
" 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 += "
Takeover In Progress:
[timer] seconds remain

" dat += "Registration: [(gang == "A")? gang_name("A") : gang_name("B")] Gang [boss ? "Administrator" : "Lieutenant"]
" - dat += "Organization Size: [gang_size]
" - dat += "Station Control: [round((gang_territory/start_state.num_territories)*100, 1)]%
" + dat += "Organization Size: [gang_size] | Station Control: [round((gang_territory/start_state.num_territories)*100, 1)]%
" + dat += "Send Gang-wide Message
" dat += "Recall Emergency Shuttle
" dat += "
" dat += "Influence: [points]
" - dat += "Time until Influence grows: [(points >= 100) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]
" - dat += "Purchase Items:
" - - dat += "(5 Influence) " - if(points >= 5) - dat += "Send Gang-wide Message
" - else - dat += "Send Gang-wide Message
" - - dat += "(10 Influence) " - if(points >= 10) - dat += "Territory Spraycan
" - else - dat += "Territory Spraycan
" + dat += "Time until Influence grows: [(points >= 999) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]
" + dat += "
" + dat += "Purchase Weapons:
" dat += "(10 Influence) " if(points >= 10) @@ -64,8 +62,8 @@ else dat += "Switchblade
" - dat += "(25 Influence) " - if(points >= 25) + dat += "(20 Influence) " + if(points >= 20) dat += "10mm Pistol
" else dat += "10mm Pistol
" @@ -76,8 +74,35 @@ else dat += "10mm Ammo
" - dat += "(40 Influence) " - if(points >= 40) + dat += "(50 Influence) " + if(points >= 50) + dat += "Thompson SMG
" + else + dat += "Thompson SMG
" + + dat += "
" + dat += "Purchase Utilities:
" + + dat += "(10 Influence) " + if(points >= 10) + dat += "Territory Spraycan
" + else + dat += "Territory Spraycan
" + + dat += "(1 Influence) " + if(points >= 1) + dat += "Gang Outfit
" + else + dat += "Gang Outfit
" + + dat += "(10 Influence) " + if(points >= 10) + dat += "Bulletproof Vest
" + else + dat += "Bulletproof Vest
" + + dat += "(30 Influence) " + if(points >= 30) dat += "Recruitment Pen
" else dat += "Recruitment Pen
" @@ -91,14 +116,23 @@ dat += "Promote a Gangster
" else dat += "Promote a Gangster
" + if(gangmode) + dat += "(50 Influence) " + if(points >= 50) + dat += "Station Dominator
" + dat += "(Estimated Takeover Time: [round(max(180,900 - ((round((gang_territory/start_state.num_territories)*200, 10) - 60) * 15))/60,1)] minutes)
" + else + dat += "Station Dominator
" dat += "
" dat += "Refresh
" - 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 << "You can only use this on the station!" + fail = 1 + for(var/obj/obj in usrturf) + if(obj.density) + usr << "There's not enough room here!" + 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 = "[boss ? "Gang Boss" : "Gang Lieutenant"]: [message]" for(var/datum/mind/ganger in members) if(ganger.current.z <= 2) - ganger.current << "BOSS: [message]" - message_admins("[key_name_admin(user)] sent a global message to the [gang_name(gang)] Gang ([gang]): [message].") + ganger.current << "[ping]" + for(var/mob/M in dead_mob_list) + M << "[gang_name(gang)] [ping]" 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 << "You have been promoted to Lieutenant!" ticker.mode.forge_gang_objectives(user.mind) ticker.mode.greet_gang(user.mind,0) - user << "The Gangtool you registered will allow you to use your gang's influence to purchase items and prevent the station from evacuating before your gang can take over. Use it to recall the emergency shuttle from anywhere on the station." + user << "The Gangtool 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 recruitment pens to grow your gang membership. Use them on unsuspecting crew members to recruit them." if(!gang) usr << "ACCESS DENIED: Unauthorized user." diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 731a7324b81..a512741096f 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -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 << "You [capped ? "Remove" : "Replace"] the cap of the [src]" 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 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2c411d2778e..5f4793276f2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 902e1420504..855ecf423c4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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 diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index fdec6f437b9..8a6ffca294b 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -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 diff --git a/code/orphaned procs/priority_announce.dm b/code/orphaned procs/priority_announce.dm index e085fa783ca..3630b9d58df 100644 --- a/code/orphaned procs/priority_announce.dm +++ b/code/orphaned procs/priority_announce.dm @@ -6,7 +6,8 @@ if(type == "Priority") announcement += "

Priority Announcement

" - + if (title && length(title) > 0) + announcement += "

[html_encode(title)]

" else if(type == "Captain") announcement += "

Captain Announces

" news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null) diff --git a/html/changelogs/Ikarrus-gangupdoot.yml b/html/changelogs/Ikarrus-gangupdoot.yml new file mode 100644 index 00000000000..18663d867c5 --- /dev/null +++ b/html/changelogs/Ikarrus-gangupdoot.yml @@ -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: "Gang Updates" + - rscadd: "New objective: To win, Gangs must now buy a Dominator machine (50 influence) and defend it for a varying time frame.
\ + * The location of the dominator is broadcasted to the entire station the moment it is activated
\ + * The more territories the gang controls, the less time it will take
\ + * 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" \ No newline at end of file diff --git a/icons/obj/crayons.dmi b/icons/obj/crayons.dmi index a3966103053..7d3489285c3 100644 Binary files a/icons/obj/crayons.dmi and b/icons/obj/crayons.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 473e51f6964..5a3e80c66f7 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/machines/dominator.dmi b/icons/obj/machines/dominator.dmi new file mode 100644 index 00000000000..7671dedff86 Binary files /dev/null and b/icons/obj/machines/dominator.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 7e8d66f026d..c6e84e72c5e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"