-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ParadiseSS13/master
Merge From Master
- Loading branch information
Showing
86 changed files
with
2,795 additions
and
2,600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* Using the HUD procs is simple. Call these procs in the life.dm of the intended mob. | ||
Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hud(mob) so | ||
the HUD updates properly! */ | ||
|
||
//Medical HUD outputs. Called by the Life() proc of the mob using it, usually. | ||
proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt) | ||
if(!can_process_hud(M)) | ||
return | ||
|
||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users) | ||
for(var/mob/living/carbon/human/patient in P.Mob.in_view(P.Turf)) | ||
if(P.Mob.see_invisible < patient.invisibility) | ||
continue | ||
|
||
if(!local_scanner) | ||
if(istype(patient.w_uniform, /obj/item/clothing/under)) | ||
var/obj/item/clothing/under/U = patient.w_uniform | ||
if(U.sensor_mode < 2) | ||
continue | ||
else | ||
continue | ||
|
||
P.Client.images += patient.hud_list[HEALTH_HUD] | ||
if(local_scanner) | ||
P.Client.images += patient.hud_list[STATUS_HUD] | ||
|
||
//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features. | ||
proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt) | ||
if(!can_process_hud(M)) | ||
return | ||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users) | ||
for(var/mob/living/carbon/human/perp in P.Mob.in_view(P.Turf)) | ||
if(P.Mob.see_invisible < perp.invisibility) | ||
continue | ||
|
||
P.Client.images += perp.hud_list[ID_HUD] | ||
if(advanced_mode) | ||
P.Client.images += perp.hud_list[WANTED_HUD] | ||
P.Client.images += perp.hud_list[IMPTRACK_HUD] | ||
P.Client.images += perp.hud_list[IMPLOYAL_HUD] | ||
P.Client.images += perp.hud_list[IMPCHEM_HUD] | ||
|
||
datum/arranged_hud_process | ||
var/client/Client | ||
var/mob/Mob | ||
var/turf/Turf | ||
|
||
proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list) | ||
hud_list |= M | ||
var/datum/arranged_hud_process/P = new | ||
P.Client = M.client | ||
P.Mob = Alt ? Alt : M | ||
P.Turf = get_turf(P.Mob) | ||
return P | ||
|
||
proc/can_process_hud(var/mob/M) | ||
if(!M) | ||
return 0 | ||
if(!M.client) | ||
return 0 | ||
if(M.stat != CONSCIOUS) | ||
return 0 | ||
return 1 | ||
|
||
//Deletes the current HUD images so they can be refreshed with new ones. | ||
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs. | ||
if(client) | ||
for(var/image/hud in client.images) | ||
if(copytext(hud.icon_state,1,4) == "hud") | ||
client.images -= hud | ||
med_hud_users -= src | ||
sec_hud_users -= src | ||
|
||
mob/proc/in_view(var/turf/T) | ||
return view(T) | ||
|
||
/mob/aiEye/in_view(var/turf/T) | ||
var/list/viewed = new | ||
for(var/mob/living/carbon/human/H in mob_list) | ||
if(get_dist(H, T) <= 7) | ||
viewed += H | ||
return viewed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.