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/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm index facf096b610..b021a1b57e0 100644 --- a/code/game/gamemodes/antag_hud.dm +++ b/code/game/gamemodes/antag_hud.dm @@ -74,3 +74,30 @@ 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) + icontype = icon + if(serv_mind in masters) + world << "Master Added" + var/I = image('icons/mob/hud.dmi', loc = serv_mind.current, icon_state = "hud[icontype]") + serv_mind.current.client.images += I + else + var/I = image('icons/mob/hud.dmi', loc = serv_mind.current, icon_state = "hud[icontype]") + serv_mind.current.client.images += I + diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index e95deef10be..80e941715bc 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -338,43 +338,14 @@ /datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind) var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO] - var/ref = "\ref[traitor_mind]" - if(ref in implanter) - if(traitor_mind.current) - tatorhud.join_solo_hud(traitor_mind.current) - set_antag_hud(traitor_mind.current, "hudsyndicate") - for(var/headref in implanter) - for(var/datum/mind/t_mind in implanter[headref]) - var/datum/mind/head = locate(headref) - if(head) - if(head.current) - if(head.current.client) - tatorhud.join_solo_hud(head.current) - set_antag_hud(head.current, "hudsyndicate") - if(t_mind.current) - if(t_mind.current.client) - tatorhud.join_solo_hud(t_mind.current) - set_antag_hud(t_mind.current, "hudsyndicate") + //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) var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO] - for(var/headref in implanter) - var/datum/mind/head = locate(headref) - for(var/datum/mind/t_mind in implanter[headref]) - if(t_mind.current) - if(t_mind.current.client) - tatorhud.leave_hud(t_mind.current) - set_antag_hud(t_mind.current, null) - - if(head) - //log_to_dd("found [head.name]") - if(head.current) - if(head.current.client) - tatorhud.leave_hud(head.current) - set_antag_hud(head.current, null) - if(traitor_mind.current.client) - tatorhud.leave_hud(traitor_mind.current) - set_antag_hud(traitor_mind.current, null) + 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) @@ -385,6 +356,11 @@ implanted -= traitor_mind traitors -= traitor_mind traitor_mind.special_role = null + + for(var/image/I in traitor_mind.current.client.images) + if(I.icon_state == "hudsyndicate") + qdel(I) + 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_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 615f99c1b4c..791dca2579b 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -325,6 +325,13 @@ ticker.mode.vampire_thralls[ref] = list(H.mind) else ticker.mode.vampire_thralls[ref] += H.mind + + var/datum/mindslaves/slaved = new(null,src) + slaved.masters = src + 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" diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 9b2e3ef86fc..92a895b369b 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -413,7 +413,14 @@ 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) + + var/datum/mindslaves/slaved = new(null,user) + slaved.masters = user + slaved.serv = H + slaved.add_serv_hud(user.mind,"syndicate")//handles master servent icons + slaved.add_serv_hud(H.mind,"mindslave") + + ticker.mode.update_traitor_icons_added(H.mind)//handles datahuds/observerhuds ticker.mode.update_traitor_icons_added(user.mind) log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].") return 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