mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #3178 from Aurorablade/insertlewdcommenthere
try to fix mindslave implant hud
This commit is contained in:
+7
-1
@@ -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)
|
||||
|
||||
|
||||
@@ -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 << "<B><font color='red'>Your powers are awoken. Your lust for blood grows... You are a Vampire!</font></B>"
|
||||
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 << "<B>\red You are a traitor!</B>"
|
||||
log_admin("[key_name(usr)] has traitored [key_name(current)]")
|
||||
|
||||
@@ -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)
|
||||
@@ -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("<b>Potential Collaborator</b>: [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 <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were implanted until now.(You don't remember who implanted you)</B></FONT>"
|
||||
|
||||
@@ -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 <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were enthralled until now.</B></FONT>"
|
||||
|
||||
@@ -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 << "<b>\red You have been Enthralled by [name]. Follow their every command.</b>"
|
||||
src << "\red You have successfully Enthralled [H.name]. <i>If they refuse to do as you say just adminhelp.</i>"
|
||||
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()
|
||||
|
||||
@@ -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 << "<B>Objective #1</B>: [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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user