Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TM-ONLY] Откат тгуи обратно на инферно #1074

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"eslint.nodePath": "./tgui/.yarn/sdks",
"eslint.workingDirectories": ["./tgui"],
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs",
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js",
"typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.eslint": true
},
"files.eol": "\n",
"files.insertFinalNewline": true,
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/atom_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
/// loyality implant
#define IMPLOYAL_HUD "5"
/// chemical implant
#define IMPSEC_FIRST_HUD "6"
#define IMPCHEM_HUD "6"
/// tracking implant
#define IMPSEC_SECOND_HUD "7"
#define IMPTRACK_HUD "7"
/// Silicon/Mech/Circuit Status
#define DIAG_STAT_HUD "8"
/// Silicon health bar
Expand Down
5 changes: 0 additions & 5 deletions code/__DEFINES/implants.dm

This file was deleted.

4 changes: 4 additions & 0 deletions code/_globalvars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ GLOBAL_LIST_EMPTY(cooking_recipes_atoms)
GLOBAL_LIST_EMPTY(rcd_list)
/// list of wallmounted intercom radios.
GLOBAL_LIST_EMPTY(intercoms_list)
/// list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
GLOBAL_LIST_EMPTY(tracked_implants)
/// list of implants the prisoner console can track and send inject commands too
GLOBAL_LIST_EMPTY(tracked_chem_implants)
/// list of all pinpointers. Used to change stuff they are pointing to all at once.
GLOBAL_LIST_EMPTY(pinpointer_list)
/// A list of all zombie_infection organs, for any mass "animation"
Expand Down
37 changes: 16 additions & 21 deletions code/game/data_huds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
hud_icons = list(ID_HUD)

/datum/atom_hud/data/human/security/advanced
hud_icons = list(ID_HUD, IMPSEC_FIRST_HUD, IMPLOYAL_HUD, IMPSEC_SECOND_HUD, WANTED_HUD, PERMIT_HUD, DNR_HUD) //SKYRAT EDIT ADDITION - PERMIT_HUD, DNR_HUD
hud_icons = list(ID_HUD, IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD, WANTED_HUD, PERMIT_HUD, DNR_HUD) //SKYRAT EDIT ADDITION - PERMIT_HUD, DNR_HUD

/datum/atom_hud/data/human/fan_hud
hud_icons = list(FAN_HUD)
Expand Down Expand Up @@ -287,30 +287,25 @@ Security HUDs! Basic mode shows only the job.

/mob/living/proc/sec_hud_set_implants()
var/image/holder
for(var/i in list(IMPSEC_FIRST_HUD, IMPLOYAL_HUD, IMPSEC_SECOND_HUD))
for(var/i in list(IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD))
holder = hud_list[i]
holder.icon_state = null
set_hud_image_inactive(i)

var/security_slot = 1 //Which of the two security hud slots are we putting found security implants in?
for(var/obj/item/implant/current_implant in implants)
if(current_implant.implant_flags & IMPLANT_TYPE_SECURITY)
switch(security_slot)
if(1)
holder = hud_list[IMPSEC_FIRST_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.icon_state = current_implant.hud_icon_state
set_hud_image_active(IMPSEC_FIRST_HUD)
security_slot++

if(2) //Theoretically if we somehow get multiple sec implants, whatever the most recently implanted implant is will take over the 2nd position
holder = hud_list[IMPSEC_SECOND_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.pixel_x = initial(holder.pixel_x) + 7 //Adds an offset that mirrors the hud blip to the other side of the mob.
holder.icon_state = current_implant.hud_icon_state
set_hud_image_active(IMPSEC_SECOND_HUD)
for(var/obj/item/implant/I in implants)
if(istype(I, /obj/item/implant/tracking))
holder = hud_list[IMPTRACK_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.icon_state = "hud_imp_tracking"
set_hud_image_active(IMPTRACK_HUD)

else if(istype(I, /obj/item/implant/chem))
holder = hud_list[IMPCHEM_HUD]
var/icon/IC = icon(icon, icon_state, dir)
holder.pixel_y = IC.Height() - world.icon_size
holder.icon_state = "hud_imp_chem"
set_hud_image_active(IMPCHEM_HUD)

if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
holder = hud_list[IMPLOYAL_HUD]
Expand Down
74 changes: 34 additions & 40 deletions code/game/machinery/computer/prisoner/_prisoner.dm
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
/obj/machinery/computer/prisoner
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON|INTERACT_MACHINE_SET_MACHINE|INTERACT_MACHINE_REQUIRES_LITERACY
/// ID card currently inserted into the computer.
VAR_FINAL/obj/item/card/id/advanced/prisoner/contained_id

/obj/machinery/computer/prisoner/deconstruct(disassembled, mob/user)
contained_id?.forceMove(drop_location())
return ..()
var/obj/item/card/id/advanced/prisoner/contained_id

/obj/machinery/computer/prisoner/Destroy()
QDEL_NULL(contained_id)
if(contained_id)
contained_id.forceMove(get_turf(src))
return ..()

/obj/machinery/computer/prisoner/Exited(atom/movable/gone, direction)
. = ..()
if(gone == contained_id)
contained_id = null

/obj/machinery/computer/prisoner/examine(mob/user)
. = ..()
if(contained_id)
. += span_notice("<b>Alt-click</b> to eject the ID card.")



/obj/machinery/computer/prisoner/AltClick(mob/user)
. = ..()
if(user.can_perform_action(src, ALLOW_SILICON_REACH))
id_eject(user)
id_eject(user)
return ..()

/obj/machinery/computer/prisoner/proc/id_insert(mob/user, obj/item/card/id/advanced/prisoner/new_id)
if(!istype(new_id))
return
if(!isnull(contained_id))
balloon_alert(user, "no empty slot!")
return
if(!user.transferItemToLoc(new_id, src))
return
contained_id = new_id
balloon_alert_to_viewers("id inserted")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
/obj/machinery/computer/prisoner/proc/id_insert(mob/user, obj/item/card/id/advanced/prisoner/P)
if(istype(P))
if(contained_id)
to_chat(user, span_warning("There's already an ID card in the console!"))
return
if(!user.transferItemToLoc(P, src))
return
contained_id = P
user.visible_message(span_notice("[user] inserts an ID card into the console."), \
span_notice("You insert the ID card into the console."))
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()

/obj/machinery/computer/prisoner/proc/id_eject(mob/user)
if(isnull(contained_id))
balloon_alert(user, "no id!")
if(!contained_id)
to_chat(user, span_warning("There's no ID card in the console!"))
return

if(!issilicon(user) && Adjacent(user))
user.put_in_hands(contained_id)
else
contained_id.forceMove(drop_location())

balloon_alert_to_viewers("id ejected")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)

/obj/machinery/computer/prisoner/attackby(obj/item/weapon, mob/user, params)
if(istype(weapon, /obj/item/card/id/advanced/prisoner))
id_insert(user, weapon)
return TRUE

return ..()
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(contained_id)
contained_id = null
user.visible_message(span_notice("[user] gets an ID card from the console."), \
span_notice("You get the ID card from the console."))
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()

/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id/advanced/prisoner))
id_insert(user, I)
else
return ..()
Loading
Loading