diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index 8842b23e433d86..0126fde53842bf 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -24,3 +24,4 @@ #define ANTAG_HUD_OPS 7 #define ANTAG_HUD_GANG_A 8 #define ANTAG_HUD_GANG_B 9 +#define ANTAG_HUD_WIZ 10 \ No newline at end of file diff --git a/code/datums/hud.dm b/code/datums/hud.dm index 63d2d719484b5f..39d63400ddb04f 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -11,6 +11,7 @@ var/datum/atom_hud/huds = list( \ ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \ ANTAG_HUD_GANG_A = new/datum/atom_hud/antag(), \ ANTAG_HUD_GANG_B = new/datum/atom_hud/antag(), \ + ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \ ) /datum/atom_hud diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index 1791a7319c7d14..f2a2ca65f297af 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -58,6 +58,8 @@ src.used = 1 var/client/C = pick(candidates) spawn_antag(C, get_turf(H.loc), href_list["school"]) + if(H.mind) + ticker.mode.update_wiz_icons_added(H.mind) else H << "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later." @@ -103,6 +105,7 @@ M.mind.objectives += new_objective ticker.mode.traitors += M.mind M.mind.special_role = "apprentice" + ticker.mode.update_wiz_icons_added(M.mind) M << sound('sound/effects/magic.ogg') /obj/item/weapon/antag_spawner/contract/equip_antag(mob/target as mob) diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index d89de5b45307e2..a7e376e48574a6 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -2,6 +2,7 @@ name = "ragin' mages" config_tag = "raginmages" required_players = 20 + use_huds = 1 var/max_mages = 0 var/making_mage = 0 var/mages_made = 1 diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 17727d00c2e71f..ff3763796bb824 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -9,7 +9,7 @@ required_enemies = 1 recommended_enemies = 1 pre_setup_before_jobs = 1 - + var/use_huds = 0 var/finished = 0 /datum/game_mode/wizard/announce() @@ -40,6 +40,8 @@ equip_wizard(wizard.current) name_wizard(wizard.current) greet_wizard(wizard) + if(use_huds) + update_wiz_icons_added(wizard) ..() return @@ -276,5 +278,18 @@ Made a proc so this is not repeated 14 (or more) times.*/ else return 1 + /proc/iswizard(mob/living/M as mob) return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.wizards) + + +/datum/game_mode/proc/update_wiz_icons_added(datum/mind/wiz_mind) + var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ] + wizhud.join_hud(wiz_mind.current) + set_antag_hud(wiz_mind.current, ((wiz_mind in wizards) ? "wizard" : "apprentice")) + + +/datum/game_mode/proc/update_wiz_icons_removed(datum/mind/wiz_mind) + var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ] + wizhud.leave_hud(wiz_mind.current) + set_antag_hud(wiz_mind.current, null) diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm index 13bfc403bcc892..09fd77c6d75fe3 100644 --- a/code/game/objects/items/devices/violin.dm +++ b/code/game/objects/items/devices/violin.dm @@ -19,6 +19,9 @@ ..() /obj/item/device/violin/attack_self(mob/user as mob) + if(!user.IsAdvancedToolUser()) + user << "You don't have the dexterity to do this!" + return 1 interact(user) /obj/item/device/violin/interact(mob/user as mob) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 061fdd3b1419fb..6510eaf31a53b6 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -323,8 +323,14 @@ ..() /obj/structure/piano/attack_hand(mob/user as mob) + if(!user.IsAdvancedToolUser()) + user << "You don't have the dexterity to do this!" + return 1 interact(user) +/obj/structure/piano/attack_paw(mob/user as mob) + return src.attack_hand(user) + /obj/structure/piano/interact(mob/user as mob) if(!user || !anchored) return diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 67552863327918..0dcf0f5f4517cc 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -31,8 +31,13 @@ if(1 to 4) overlays += "plasma-[plasmatanks]" if(5 to INFINITY) overlays += "plasma-5" +/obj/structure/dispenser/attack_paw(mob/user as mob) + return src.attack_hand(user) /obj/structure/dispenser/attack_hand(mob/user as mob) + if(!user.IsAdvancedToolUser()) + user << "You don't have the dexterity to do this!" + return 1 user.set_machine(src) var/dat = "[src]

" dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "Dispense" : "empty"]
" diff --git a/code/modules/events/wizard/imposter.dm b/code/modules/events/wizard/imposter.dm index d12f57e3d7caf6..1a55876b8e8894 100644 --- a/code/modules/events/wizard/imposter.dm +++ b/code/modules/events/wizard/imposter.dm @@ -45,6 +45,7 @@ protect_objective.target = W.mind protect_objective.explanation_text = "Protect [W.real_name], the wizard." I.mind.objectives += protect_objective + ticker.mode.update_wiz_icons_added(I.mind) I.attack_log += "\[[time_stamp()]\] Is an imposter!" I << "You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!" diff --git a/data/mode.txt b/data/mode.txt index ef18df98db464f..cf1ffd5c991a43 100644 --- a/data/mode.txt +++ b/data/mode.txt @@ -1 +1 @@ -extended +extended \ No newline at end of file diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 12fe2bf881204d..a9746f5b5c30e1 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ