diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 977f81f796d..82fe1ba1cf5 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -426,5 +426,10 @@ 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 \ No newline at end of file +#define EXPLOSION_BLOCK_PROC -1 diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 670a1778fb1..e5d1f4c19e1 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -2,11 +2,6 @@ //Misc mob defines -//Ready states at roundstart for mob/dead/new_player -#define PLAYER_NOT_READY 0 -#define PLAYER_READY_TO_PLAY 1 -#define PLAYER_READY_TO_OBSERVE 2 - //movement intent defines for the m_intent var #define MOVE_INTENT_WALK "walk" #define MOVE_INTENT_RUN "run" @@ -133,4 +128,4 @@ #define INCORPOREAL_MOVE_BASIC 1 #define INCORPOREAL_MOVE_SHADOW 2 // leaves a trail of shadows -#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt +#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt \ No newline at end of file diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 731166e0a9f..05d8dbb5b7e 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -224,7 +224,7 @@ SUBSYSTEM_DEF(job) //Get the players who are ready for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.ready == PLAYER_READY_TO_PLAY && player.mind && !player.mind.assigned_role) + if(player.ready && player.mind && !player.mind.assigned_role) unassigned += player initial_players_to_assign = unassigned.len @@ -456,7 +456,7 @@ SUBSYSTEM_DEF(job) var/level5 = 0 //banned var/level6 = 0 //account too young for(var/mob/dead/new_player/player in GLOB.player_list) - if(!(player.ready == PLAYER_READY_TO_PLAY && player.mind && !player.mind.assigned_role)) + if(!(player.ready && player.mind && !player.mind.assigned_role)) continue //This player is not ready if(jobban_isbanned(player, job.title)) level5++ @@ -489,7 +489,7 @@ SUBSYSTEM_DEF(job) Debug("Popcap overflow Check observer located, Player: [player]") to_chat(player, "You have failed to qualify for any job you desired.") unassigned -= player - player.ready = PLAYER_NOT_READY + player.ready = 0 /datum/controller/subsystem/job/Recover() diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 2a1f54e1712..55f3fc26afa 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -83,8 +83,6 @@ SUBSYSTEM_DEF(ticker) window_flash(C, ignorepref = TRUE) //let them know lobby has opened up. to_chat(world, "Welcome to [station_name()]!") current_state = GAME_STATE_PREGAME - //Everyone who wants to be an observer is now spawned - create_observers() fire() if(GAME_STATE_PREGAME) //lobby stats for statpanels @@ -94,7 +92,7 @@ SUBSYSTEM_DEF(ticker) totalPlayersReady = 0 for(var/mob/dead/new_player/player in GLOB.player_list) ++totalPlayers - if(player.ready == PLAYER_READY_TO_PLAY) + if(player.ready) ++totalPlayersReady if(start_immediately) @@ -133,7 +131,6 @@ SUBSYSTEM_DEF(ticker) declare_completion(force_ending) Master.SetRunLevel(RUNLEVEL_POSTGAME) - /datum/controller/subsystem/ticker/proc/setup() to_chat(world, "Starting game...") var/init_start = world.timeofday @@ -405,7 +402,7 @@ SUBSYSTEM_DEF(ticker) /datum/controller/subsystem/ticker/proc/create_characters() for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.ready == PLAYER_READY_TO_PLAY && player.mind) + if(player.ready && player.mind) GLOB.joined_player_list += player.ckey player.create_character(FALSE) else @@ -796,13 +793,6 @@ SUBSYSTEM_DEF(ticker) else timeLeft = newtime -//Everyone who wanted to be an observer gets made one now -/datum/controller/subsystem/ticker/proc/create_observers() - for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.ready == PLAYER_READY_TO_OBSERVE && player.mind) - //Break chain since this has a sleep input in it - addtimer(CALLBACK(player, /mob/dead/new_player.proc/make_me_an_observer), 1) - /datum/controller/subsystem/ticker/proc/load_mode() var/mode = trim(file2text("data/mode.txt")) if(mode) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 6b9fd52627c..125e992fccc 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1043,7 +1043,7 @@ if(!G || (src in G.bosses)) return SSticker.mode.remove_gangster(src,0,2,1) - G.bosses += src + G.bosses[src] = GANGSTER_BOSS_STARTING_INFLUENCE gang_datum = G special_role = "[G.name] Gang Boss" G.add_gang_hud(src) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index b5f2b1cec12..1fe8fcac652 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -54,7 +54,7 @@ /datum/game_mode/proc/can_start() var/playerC = 0 for(var/mob/dead/new_player/player in GLOB.player_list) - if((player.client)&&(player.ready == PLAYER_READY_TO_PLAY)) + if((player.client)&&(player.ready)) playerC++ if(!GLOB.Debug2) if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players)) @@ -308,7 +308,7 @@ // Ultimate randomizing code right here for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(player.client && player.ready) players += player // Shuffling, the players list is now ping-independent!!! @@ -316,7 +316,7 @@ players = shuffle(players) for(var/mob/dead/new_player/player in players) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(player.client && player.ready) if(role in player.client.prefs.be_special) if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans if(age_check(player.client)) //Must be older than the minimum age @@ -330,7 +330,7 @@ if(candidates.len < recommended_enemies) for(var/mob/dead/new_player/player in players) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(player.client && player.ready) if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans drafted += player.mind @@ -352,7 +352,13 @@ else // Not enough scrubs, ABORT ABORT ABORT break - +/* + if(candidates.len < recommended_enemies && override_jobbans) //If we still don't have enough people, we're going to start drafting banned people. + for(var/mob/dead/new_player/player in players) + if (player.client && player.ready) + if(jobban_isbanned(player, "Syndicate") || jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans + drafted += player.mind +*/ if(restricted_jobs) for(var/datum/mind/player in drafted) // Remove people who can't be an antagonist for(var/job in restricted_jobs) @@ -375,12 +381,17 @@ // recommended_enemies if the number of people with that role set to yes is less than recomended_enemies, // Less if there are not enough valid players in the game entirely to make recommended_enemies. - +/* +/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/dead/new_player/player) + if(player.preferences.be_special & role) + return 1 + return 0 +*/ /datum/game_mode/proc/num_players() . = 0 for(var/mob/dead/new_player/P in GLOB.player_list) - if(P.client && P.ready == PLAYER_READY_TO_PLAY) + if(P.client && P.ready) . ++ /////////////////////////////////// diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 6606a0d8718..5b97280e9ac 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/ for(var/n in 1 to 3) var/datum/mind/boss = pick(antag_candidates) antag_candidates -= boss - G.bosses += boss + G.bosses[boss] = GANGSTER_BOSS_STARTING_INFLUENCE boss.gang_datum = G var/title if(n == 1) @@ -85,6 +85,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/ 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) @@ -170,7 +171,7 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/ return 0 if(check && gangster_mind.current.isloyal()) //Check to see if the potential gangster is implanted return 1 - G.gangsters += gangster_mind + G.gangsters[gangster_mind] = GANGSTER_SOLDIER_STARTING_INFLUENCE gangster_mind.gang_datum = G if(check) if(iscarbon(gangster_mind.current)) @@ -209,15 +210,24 @@ GLOBAL_LIST_INIT(gang_outfit_pool, list(/obj/item/clothing/suit/jacket/leather,/ 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 diff --git a/code/game/gamemodes/gang/gang_datum.dm b/code/game/gamemodes/gang/gang_datum.dm index 0fe53adf02f..1a145d1227a 100644 --- a/code/game/gamemodes/gang/gang_datum.dm +++ b/code/game/gamemodes/gang/gang_datum.dm @@ -8,6 +8,7 @@ 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() @@ -202,9 +203,9 @@ 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 @@ -245,47 +246,90 @@ set_domination_time(new_time) message += "[seconds_remaining] seconds remain in hostile takeover.
" else - for(var/obj/item/device/gangtool/G in gangtools) - var/pmessage = message - var/points_new = 0 - if(istype(G, /obj/item/device/gangtool/soldier)) - points_new = max(0,round(3 - G.points/10)) + (sbonus) + (LAZYLEN(G.tags)/2) // Soldier points - pmessage += "Your influence has increased by [round(sbonus)] from your gang holding [LAZYLEN(territory)] territories, and a bonus of [round(LAZYLEN(G.tags)/2)] for territories you have personally marked and kept intact.
" - else - points_new = max(0,round(5 - G.points/10)) + LAZYLEN(territory) // Boss points, more focused on big picture - pmessage += "Your influence has increased by [round(points_new)] from your gang holding [territory.len] territories
" - G.points += points_new - var/mob/living/carbon/human/ganger = get(G.loc, /mob/living) - var/points_newer = 0 - var/static/inner = inner_outfit - var/static/outer = outer_outfit - if(ishuman(ganger) && ganger.mind in (gangsters|bosses)) - for(var/obj/C in ganger.contents) - if(C.type == inner_outfit) - points_newer += 2 - continue - if(C.type == outer_outfit) - points_newer += 2 - continue - switch(C.type) - if(/obj/item/clothing/neck/necklace/dope) - points_newer += 2 - if(/obj/item/clothing/head/collectable/petehat/gang) - points_newer += 4 - if(/obj/item/clothing/shoes/gang) - points_newer += 6 - if(/obj/item/clothing/mask/gskull) - points_newer += 5 - if(/obj/item/clothing/gloves/gang) - points_newer += 3 - if(/obj/item/weapon/storage/belt/military/gang) - points_newer += 4 - if(points_newer) - G.points += points_newer - pmessage += "Your influential choice of clothing has further increased your influence by [points_newer] points.
" - pmessage += "You now have [G.points] influence.
" - to_chat(ganger, "[bicon(G)] [pmessage]") + 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, "Your influential choice of clothing has increased your influence by [.] points!") + else + announce_to_mind(gangsta, "Unfortunately, you have not gained any additional influence from your drab, old, boring clothing. Learn to dress like a gangsta, bro!") //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, "You have not gained any influence from territories you personally tagged. Get to work, soldier!") + else + announce_to_mind(soldier, "You have gained [returned] influence from [get_soldier_territories(soldier)] territories you have personally tagged.") + +/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, "Your influence has increased by [inc] from your gang holding [LAZYLEN(territory)] territories!") + +/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, "[name] Gang: You now have a total of [get_influence(gangster_mind)] influence!") + +/datum/gang/proc/reclaim_points(amount) + for(var/datum/mind/bawss in bosses) + adjust_influence(bawss, amount/bosses.len) + announce_to_mind(bawss, "[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.") //Multiverse diff --git a/code/game/gamemodes/gang/gang_items.dm b/code/game/gamemodes/gang/gang_items.dm index a02a0e5bf5b..832f7096a92 100644 --- a/code/game/gamemodes/gang/gang_items.dm +++ b/code/game/gamemodes/gang/gang_items.dm @@ -11,7 +11,7 @@ if(check_canbuy && !can_buy(user, gang, gangtool)) return FALSE var/real_cost = get_cost(user, gang, gangtool) - gangtool.points -= real_cost + gang.adjust_influence(user.mind, -real_cost) spawn_item(user, gang, gangtool) return TRUE @@ -23,7 +23,7 @@ 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 && (gangtool.points >= get_cost(user, gang, gangtool)) && can_see(user, gang, 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 @@ -118,6 +118,9 @@ 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" @@ -129,6 +132,8 @@ 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" @@ -141,13 +146,15 @@ 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" @@ -160,6 +167,9 @@ 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" @@ -173,7 +183,8 @@ desc = "The belt buckle simply reads 'BAMF'." storage_slots = 1 - +/obj/item/weapon/storage/belt/military/gang/gang_contraband_value() + return 4 /////////////////// //WEAPONS diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index 7c7f75a22ae..25cbce16e12 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -15,7 +15,6 @@ var/outfits = 2 var/free_pen = 0 var/promotable = 0 - var/points = 15 var/list/tags = list() /obj/item/device/gangtool/Initialize() //Initialize supply point income if it hasn't already been started @@ -50,7 +49,7 @@ var/isboss = (user.mind == gang.bosses[1]) dat += "Registration: [gang.name] Gang [isboss ? "Boss" : "Lieutenant"]
" dat += "Organization Size: [gang.gangsters.len + gang.bosses.len] | Station Control: [round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%
" - dat += "Your Influence: [points]
" + dat += "Your Influence: [gang.get_influence(user.mind)]
" dat += "Time until Influence grows: [time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss")]
" dat += "
" @@ -147,8 +146,9 @@ 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 + 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) @@ -246,9 +246,6 @@ ///////////// Internal tool used by gang regulars /////////// -/obj/item/device/gangtool/soldier - points = 5 - /obj/item/device/gangtool/soldier/New(mob/user) . = ..() gang = user.mind.gang_datum @@ -264,7 +261,7 @@ dat += "
Takeover In Progress:
[gang.domination_time_remaining()] seconds remain
" dat += "Registration: [gang.name] - Foot Soldier
" dat += "Organization Size: [gang.gangsters.len + gang.bosses.len] | Station Control: [round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%
" - dat += "Your Influence: [points]
" + dat += "Your Influence: [gang.get_influence(user.mind)]
" if(LAZYLEN(tags)) dat += "Your tags generate bonus influence for you.
You have tagged the following territories:" for(var/obj/effect/decal/cleanable/crayon/gang/T in tags) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 21b1180b3d3..039b4cc3a45 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -658,7 +658,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) var/n_p = 1 //autowin if (SSticker.current_state == GAME_STATE_SETTING_UP) for(var/mob/dead/new_player/P in GLOB.player_list) - if(P.client && P.ready == PLAYER_READY_TO_PLAY && P.mind!=owner) + if(P.client && P.ready && P.mind!=owner) n_p ++ else if (SSticker.IsRoundInProgress()) for(var/mob/living/carbon/human/P in GLOB.player_list) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index a5904138328..fd73b82d740 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -243,7 +243,7 @@ if(!is_gangster(user)) var/datum/gang/multiverse/G = new(src, "[user.real_name]") SSticker.mode.gangs += G - G.bosses += user.mind + G.bosses[user.mind] = 0 G.add_gang_hud(user.mind) user.mind.gang_datum = G to_chat(user, "With your new found power you could easily conquer the station!") diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index a96f3b50a2e..00987d78595 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -30,27 +30,35 @@ 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/obj/item/device/gangtool/linked_tool + 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) - linked_tool = locate(/obj/item/device/gangtool) in user.contents - if(linked_tool) - linked_tool.tags += src + //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(linked_tool) - linked_tool.tags -= src if(gang) gang.territory -= territory.type + set_mind_owner(null) gang.territory_new -= territory.type gang.territory_lost |= list(territory.type = territory.name) return ..() diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 20f8e8c15c7..4706e26245e 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -193,3 +193,6 @@ ..() if(unique_rename) to_chat(user, "Use a pen on it to rename it or change its description.") + +/obj/proc/gang_contraband_value() + return 0 diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index feba659d725..fb08b727320 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -99,7 +99,7 @@ GLOBAL_VAR_INIT(highlander, FALSE) var/datum/gang/multiverse/G = new(src, "[H.real_name]") SSticker.mode.gangs += G - G.bosses += H.mind + G.bosses[H.mind] = 0 //No they don't use influence but this prevents runtimes. G.add_gang_hud(H.mind) H.mind.gang_datum = G diff --git a/code/modules/clothing/neck/neck.dm b/code/modules/clothing/neck/neck.dm index de4858e23e8..defe797ce7d 100644 --- a/code/modules/clothing/neck/neck.dm +++ b/code/modules/clothing/neck/neck.dm @@ -162,4 +162,7 @@ desc = "Damn, it feels good to be a gangster." icon = 'icons/obj/clothing/neck.dmi' icon_state = "bling" - item_color = "bling" \ No newline at end of file + item_color = "bling" + +/obj/item/clothing/neck/necklace/dope/gang_contraband_value() + return 2 diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index c26c1089fc7..c8bc7f4ff5b 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -29,25 +29,21 @@ /mob/dead/new_player/prepare_huds() return -/mob/dead/new_player/proc/linkify_ready(string, value) - return "Setup Character

" + + var/output = "

Setup Character

" if(!SSticker || SSticker.current_state <= GAME_STATE_PREGAME) - switch(ready) - if(PLAYER_NOT_READY) - output += "

\[ [linkify_ready("Ready", PLAYER_READY_TO_PLAY)] | Not Ready | [linkify_ready("Observe", PLAYER_READY_TO_OBSERVE)] \]

" - if(PLAYER_READY_TO_PLAY) - output += "

\[ Ready | [linkify_ready("Not Ready", PLAYER_NOT_READY)] | [linkify_ready("Observe", PLAYER_READY_TO_OBSERVE)] \]

" - if(PLAYER_READY_TO_OBSERVE) - output += "

\[ [linkify_ready("Ready", PLAYER_READY_TO_PLAY)]] | [linkify_ready("Not Ready", PLAYER_NOT_READY)] | Observe \]

" + if(ready) + output += "

\[ Ready | Not Ready \]

" + else + output += "

\[ Ready | Not Ready \]

" else output += "

View the Crew Manifest

" output += "

Join Game!

" - output += "

[linkify_ready("Observe", 2)]

" + + output += "

Observe

" if(!IsGuestKey(src.key)) if (SSdbcore.Connect()) @@ -112,23 +108,42 @@ return 1 if(href_list["ready"]) - if(SSticker) - var/tready = text2num(href_list["ready"]) - //Avoid updating ready if we're after PREGAME (they should use latejoin instead) - //This is likely not an actual issue but I don't have time to prove that this - //no longer is required - if(SSticker.current_state <= GAME_STATE_PREGAME) - ready = tready - //if it's post initialisation and they're trying to observe we do the needful - if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) - ready = tready - make_me_an_observer() - return + if(!SSticker || SSticker.current_state <= GAME_STATE_PREGAME) // Make sure we don't ready up after the round has started + ready = text2num(href_list["ready"]) if(href_list["refresh"]) src << browse(null, "window=playersetup") //closes the player setup window new_player_panel() + if(href_list["observe"]) + + if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes") + if(!client) + return 1 + var/mob/dead/observer/observer = new() + + spawning = 1 + + observer.started_as_observer = 1 + close_spawn_windows() + var/obj/O = locate("landmark*Observer-Start") + to_chat(src, "Now teleporting.") + if (O) + observer.loc = O.loc + else + to_chat(src, "Teleporting failed. The map is probably still loading...") + observer.key = key + observer.client = client + observer.set_ghost_appearance() + if(observer.client && observer.client.prefs) + observer.real_name = observer.client.prefs.real_name + observer.name = observer.real_name + observer.update_icon() + observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) + QDEL_NULL(mind) + qdel(src) + return 1 + if(href_list["late_join"]) if(!SSticker || !SSticker.IsRoundInProgress()) to_chat(usr, "The round is either not ready, or has already finished...") @@ -258,42 +273,6 @@ return to_chat(src, "Vote successful.") -//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT) -/mob/dead/new_player/proc/make_me_an_observer() - if(QDELETED(src) || !src.client) - ready = PLAYER_NOT_READY - return FALSE - - var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") - - if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") - ready = PLAYER_NOT_READY - return FALSE - - var/mob/dead/observer/observer = new() - spawning = TRUE - - observer.started_as_observer = TRUE - close_spawn_windows() - var/obj/O = locate("landmark*Observer-Start") - to_chat(src, "Now teleporting.") - if (O) - observer.loc = O.loc - else - to_chat(src, "Teleporting failed. Ahelp an admin please") - stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised") - observer.key = key - observer.client = client - observer.set_ghost_appearance() - if(observer.client && observer.client.prefs) - observer.real_name = observer.client.prefs.real_name - observer.name = observer.real_name - observer.update_icon() - observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) - QDEL_NULL(mind) - qdel(src) - return TRUE - /mob/dead/new_player/proc/IsJobAvailable(rank) var/datum/job/job = SSjob.GetJob(rank) if(!job) diff --git a/html/changelog.html b/html/changelog.html index 451bf7fd683..4533e657e97 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -60,6 +60,14 @@ +

Expletive updated:

+

Joan updated:

+

Robustin updated:

+

Shadowlight213 updated:

+

Xhuis updated:

+ +

lzimann updated:

+

oranges updated: