diff --git a/code/datums/hud.dm b/code/datums/hud.dm index f25d18ab255..e01ceb3e295 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -71,7 +71,13 @@ var/datum/atom_hud/huds = list( \ // for(var/datum/gang/G in ticker.mode.gangs) // gang_huds += G.ganghud - for(var/datum/atom_hud/hud in huds)//|gang_huds)) + var/serv_huds = list()//mindslaves and/or vampire thralls + if(ticker.mode) + for(var/datum/mindslaves/serv in (ticker.mode.vampires | ticker.mode.traitors)) + serv_huds += serv.thrallhud + + + for(var/datum/atom_hud/hud in (huds|serv_huds))//|gang_huds)) if(src in hud.hudusers) hud.add_hud_to(src) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 860ebdd01b9..c622bd2c083 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -60,6 +60,7 @@ 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/mindslaves/som //stands for slave or master...hush.. var/rev_cooldown = 0 @@ -903,6 +904,9 @@ ticker.mode.vampires += src ticker.mode.grant_vampire_powers(current) ticker.mode.update_vampire_icons_added(src) + var/datum/mindslaves/slaved = new() + slaved.masters += src + src.som = slaved //we MIGT want to mindslave someone special_role = "Vampire" current << "Your powers are awoken. Your lust for blood grows... You are a Vampire!" log_admin("[key_name(usr)] has vampired [key_name(current)]") @@ -999,6 +1003,9 @@ if("traitor") if(!(src in ticker.mode.traitors)) ticker.mode.traitors += src + var/datum/mindslaves/slaved = new() + slaved.masters += src + src.som = slaved //we MIGT want to mindslave someone special_role = "traitor" current << "\red You are a traitor!" log_admin("[key_name(usr)] has traitored [key_name(current)]") diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm index facf096b610..0b2ee9320de 100644 --- a/code/game/gamemodes/antag_hud.dm +++ b/code/game/gamemodes/antag_hud.dm @@ -1,20 +1,20 @@ /datum/atom_hud/antag hud_icons = list(SPECIALROLE_HUD,NATIONS_HUD) -/datum/atom_hud/antag/proc/join_hud(mob/M) +/datum/atom_hud/antag/proc/join_hud(mob/M,var/slave) if(!istype(M)) CRASH("join_hud(): [M] ([M.type]) is not a mob!") - if(M.mind.antag_hud) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged + if(M.mind.antag_hud && !slave) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged M.mind.antag_hud.leave_hud(M) if(!ismask(M))//FUCK YOU MASK OF NARNAR! add_to_hud(M) add_hud_to(M) M.mind.antag_hud = src -/datum/atom_hud/antag/proc/join_solo_hud(mob/M)//for non team antags and for observer huds +/datum/atom_hud/antag/proc/join_solo_hud(mob/M,var/slave)//for non team antags and for observer huds if(!istype(M)) CRASH("join_hud(): [M] ([M.type]) is not a mob!") - if(M.mind.antag_hud) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged + if(M.mind.antag_hud && !slave) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged M.mind.antag_hud.leave_hud(M) add_to_hud(M) M.mind.antag_hud = src @@ -74,3 +74,27 @@ for(var/datum/atom_hud/data/hud in huds) if(current in hud.hudusers) hud.remove_hud_from(current) + + +///Master Servent Datum Sytems,Based on TG Gang system// + +/datum/mindslaves + var/name = "ERROR" + var/list/datum/mind/masters = list() + var/list/datum/mind/serv = list() + var/datum/atom_hud/antag/thrallhud + var/icontype + +/datum/mindslaves/New(loc,mastername) + + name = mastername + thrallhud = new() + +/datum/mindslaves/proc/add_serv_hud(datum/mind/serv_mind,var/icon) + thrallhud.join_hud(serv_mind.current,1) + icontype = "hud[icon]" + ticker.mode.set_antag_hud(serv_mind.current,icontype) + +/datum/mindslaves/proc/leave_serv_hud(datum/mind/free_mind) + thrallhud.leave_hud(free_mind.current) + ticker.mode.set_antag_hud(free_mind.current,null) \ No newline at end of file diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index df18240e7bf..c975aa8292c 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -53,6 +53,9 @@ var/datum/mind/traitor = pick(possible_traitors) traitors += traitor traitor.special_role = "traitor" + var/datum/mindslaves/slaved = new() + slaved.masters += traitor + traitor.som = slaved //we MIGT want to mindslave someone traitor.restricted_roles = restricted_jobs possible_traitors.Remove(traitor) @@ -337,9 +340,9 @@ traitor_mob.mind.store_memory("Potential Collaborator: [M.real_name]") /datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind) - //var/ref = "\ref[traitor_mind]" var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO] - tatorhud.join_solo_hud(traitor_mind.current) + //var/ref = "\ref[traitor_mind]" + tatorhud.join_solo_hud(traitor_mind.current) set_antag_hud(traitor_mind.current, "hudsyndicate") /datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind) @@ -347,6 +350,7 @@ tatorhud.leave_hud(traitor_mind.current) set_antag_hud(traitor_mind.current, null) + /datum/game_mode/proc/remove_traitor_mind(datum/mind/traitor_mind, datum/mind/head) //var/list/removal var/ref = "\ref[head]" @@ -354,7 +358,13 @@ implanter[ref] -= traitor_mind implanted -= traitor_mind traitors -= traitor_mind - traitor_mind.special_role = null + if(traitor_mind.som) + var/datum/mindslaves/slaved = traitor_mind.som + slaved.serv -= traitor_mind + traitor_mind.special_role = null + traitor_mind.som = null + slaved.leave_serv_hud(traitor_mind) + update_traitor_icons_removed(traitor_mind) //world << "Removed [traitor_mind.current.name] from traitor shit" traitor_mind.current << "\red The fog clouding your mind clears. You remember nothing from the moment you were implanted until now.(You don't remember who implanted you)" diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 0931adfe4ef..553a971362c 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -59,6 +59,9 @@ vampires += vampire vampire.restricted_roles = restricted_jobs modePlayer += vampires + var/datum/mindslaves/slaved = new() + slaved.masters += vampire + vampire.som = slaved //we MIGT want to mindslave someone vampire.special_role = "Vampire" // Needs to be done in pre-setup to prevent role bugs return 1 else @@ -398,6 +401,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha vampire_thralls[ref] -= vampire_mind vampire_enthralled -= vampire_mind vampire_mind.special_role = null + var/datum/mindslaves/slaved = vampire_mind.som + slaved.serv -= vampire_mind + vampire_mind.som = null + slaved.leave_serv_hud(vampire_mind) update_vampire_icons_removed(vampire_mind) //world << "Removed [vampire_mind.current.name] from vampire shit" vampire_mind.current << "\red The fog clouding your mind clears. You remember nothing from the moment you were enthralled until now." diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 615f99c1b4c..e07f24983b1 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -325,13 +325,20 @@ ticker.mode.vampire_thralls[ref] = list(H.mind) else ticker.mode.vampire_thralls[ref] += H.mind + + ticker.mode.update_vampire_icons_added(H.mind) + ticker.mode.update_vampire_icons_added(src.mind) + var/datum/mindslaves/slaved = src.mind.som + H.mind.som = slaved + slaved.serv += H + slaved.add_serv_hud(src.mind,"vampire")//handles master servent icons + slaved.add_serv_hud(H.mind,"vampthrall") + ticker.mode.vampire_enthralled.Add(H.mind) ticker.mode.vampire_enthralled[H.mind] = src.mind H.mind.special_role = "VampThrall" H << "\red You have been Enthralled by [name]. Follow their every command." src << "\red You have successfully Enthralled [H.name]. If they refuse to do as you say just adminhelp." - ticker.mode.update_vampire_icons_added(H.mind) - ticker.mode.update_vampire_icons_added(src.mind) log_admin("[ckey(src.key)] has mind-slaved [ckey(H.key)].") /client/vampire/proc/vampire_bats() diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 9b2e3ef86fc..d27cd74140d 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -413,8 +413,17 @@ the implant may become unstable and either pre-maturely inject the subject or si H.mind.objectives += p for(var/datum/objective/objective in H.mind.objectives) H << "Objective #1: [objective.explanation_text]" - ticker.mode.update_traitor_icons_added(H.mind) + ticker.mode.update_traitor_icons_added(user.mind) + ticker.mode.update_traitor_icons_added(H.mind)//handles datahuds/observerhuds + + if(user.mind.som)//do not add if not a traitor..and you just picked up an implanter in the hall... + var/datum/mindslaves/slaved = user.mind.som + H.mind.som = slaved + slaved.serv += H + slaved.add_serv_hud(user.mind,"syndicate")//handles master servent icons + slaved.add_serv_hud(H.mind,"mindslave") + log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].") return 1 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 5d3ea0522f9..014c0623c84 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -307,13 +307,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp //var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED] //var/adding_hud = (usr in A.hudusers) ? 0 : 1 - for(var/datum/atom_hud/H in huds) - if(istype(H, /datum/atom_hud/antag))// || istype(H, /datum/atom_hud/data/human/security/advanced)) - if(!M.antagHUD) + + for(var/datum/atom_hud/antag/H in (huds)) + //if(istype(H, /datum/atom_hud/antag))// || istype(H, /datum/atom_hud/data/human/security/advanced)) + if(!M.antagHUD) //(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) - H.add_hud_to(usr) - else - H.remove_hud_from(usr) + H.add_hud_to(usr) + else + H.remove_hud_from(usr) if(!M.antagHUD) usr << "AntagHud Toggled ON" M.antagHUD = 1 diff --git a/html/changelogs/fethas.yml b/html/changelogs/fethas.yml new file mode 100644 index 00000000000..9f846471277 --- /dev/null +++ b/html/changelogs/fethas.yml @@ -0,0 +1,36 @@ +################################ +# 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 +################################# + +# Your name. Remove the quotation mark and put in your name when copy+pasting the example changelog. +author: Fethas + +# 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: + - bugfix: "Readds the hud icon showing up for master and servent" + - rscadd: "adds mindslave datum hud thingy based on TGs gang huds" diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index b7486d89af9..9b2a74768d1 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ