Skip to content

Commit

Permalink
[MIRROR] Additions to IPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx authored and SuhEugene committed Dec 4, 2023
1 parent 18b67d1 commit e81d057
Show file tree
Hide file tree
Showing 15 changed files with 515 additions and 32 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,7 @@
#include "code\modules\mob\living\carbon\human\descriptors\descriptors_nabber.dm"
#include "code\modules\mob\living\carbon\human\descriptors\descriptors_skrell.dm"
#include "code\modules\mob\living\carbon\human\descriptors\descriptors_vox.dm"
#include "code\modules\mob\living\carbon\human\machine\screen_abilities.dm"
#include "code\modules\mob\living\carbon\xenobiological\death.dm"
#include "code\modules\mob\living\carbon\xenobiological\examine.dm"
#include "code\modules\mob\living\carbon\xenobiological\hud.dm"
Expand Down
4 changes: 2 additions & 2 deletions code/_helpers/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ var/global/list/string_slot_flags = list(
paths = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
for(var/path in paths)
var/datum/sprite_accessory/hair/H = path
if (!initial(H.name))
if (is_abstract(H) || !initial(H.name))
continue
H = new path()
GLOB.hair_styles_list[H.name] = H
Expand All @@ -109,7 +109,7 @@ var/global/list/string_slot_flags = list(
paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
for(var/path in paths)
var/datum/sprite_accessory/facial_hair/H = path
if (!initial(H.name))
if (is_abstract(H) || !initial(H.name))
continue
H = new path()
GLOB.facial_hair_styles_list[H.name] = H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@
sort_category = "Xenowear"

// IPC clothing
/datum/gear/ipc_monitor
display_name = "display monitor (IPC)"
path = /obj/item/clothing/mask/monitor
sort_category = "Xenowear"
whitelisted = list(SPECIES_IPC)
cost = 0

/datum/gear/suit/lab_xyn_machine
display_name = "Xynergy labcoat"
path = /obj/item/clothing/suit/storage/toggle/labcoat/xyn_machine
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
msg += E.species.disfigure_msg(src)
else //Just in case they lack a species for whatever reason.
msg += "[SPAN_WARNING("[P.His] face is horribly mangled!")]\n"
var/datum/robolimb/robohead = all_robolimbs[E.model]
if(length(robohead.display_text) && facial_hair_style == "Text")
msg += "The message \"[robohead.display_text]\" is displayed on its screen.\n"

//splints
for(var/organ in list(BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM))
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@
var/obj/item/organ/internal/cell/potato = internal_organs_by_name[BP_CELL]
if(potato && potato.cell)
stat("Battery charge:", "[potato.get_charge()]/[potato.cell.maxcharge]")
stat("Operating temperature:", "[round(bodytemperature-T0C)]°C")

if(back && istype(back,/obj/item/rig))
var/obj/item/rig/suit = back
Expand Down
82 changes: 82 additions & 0 deletions code/modules/mob/living/carbon/human/machine/screen_abilities.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/mob/living/carbon/human/proc/MachineChangeScreen()
set category = "Abilities"
set name = "Change Screen"
if (stat)
to_chat(src, SPAN_WARNING("You're in no condition to do that."))
return
var/obj/item/organ/external/head/head = get_organ(BP_HEAD)
var/datum/robolimb/robohead = all_robolimbs[head.model]
if (!head || head.is_stump())
to_chat(src, SPAN_WARNING("You have no head!"))
return
if (head.is_broken())
to_chat(src, SPAN_WARNING("Your head is broken!"))
return
if (!robohead.has_screen)
to_chat(src, SPAN_WARNING("Your head has no screen!"))
return
var/list/options = list()
for (var/datum/sprite_accessory/facial_hair/ipc/entry as anything in subtypesof(/datum/sprite_accessory/facial_hair/ipc))
options += initial(entry.name)
var/choice = input(src, null, "Select Screen") as null | anything in options
if (!choice || !(choice in options))
return
facial_hair_style = choice
update_hair()


/mob/living/carbon/human/proc/MachineDisableScreen()
set category = "Abilities"
set name = "Disable Screen"
if (stat)
to_chat(src, SPAN_WARNING("You're in no condition to do that."))
return
var/obj/item/organ/external/head/head = get_organ(BP_HEAD)
var/datum/robolimb/robohead = all_robolimbs[head.model]
if (!head || head.is_stump())
to_chat(src, SPAN_WARNING("You have no head!"))
return
if (head.is_broken())
to_chat(src, SPAN_WARNING("Your head is broken!"))
return
if (!robohead.has_screen)
to_chat(src, SPAN_WARNING("Your head has no screen!"))
return
facial_hair_style = "Off"
update_hair()


/mob/living/carbon/human/proc/MachineShowText()
set category = "Abilities"
set name = "Set Screen Text"
if (stat)
to_chat(src, SPAN_WARNING("You're in no condition to do that."))
return
var/obj/item/organ/external/head/head = get_organ(BP_HEAD)
var/datum/robolimb/robohead = all_robolimbs[head.model]
if (!head || head.is_stump())
to_chat(src, SPAN_WARNING("You have no head!"))
return
if (head.is_broken())
to_chat(src, SPAN_WARNING("Your head is broken!"))
return
if (!robohead.has_screen)
to_chat(src, SPAN_WARNING("Your head has no screen!"))
return
var/text = input(src, null, "Display Text") as null | text
if (isnull(text))
return
text = sanitize(text, MAX_DESC_LEN)
robohead.display_text = text
facial_hair_style = "Text"
if (!length(text))
facial_hair_style = "Off"
update_hair()
if (HAS_FLAGS(head?.flags_inv, HIDEFACE) || HAS_FLAGS(wear_mask?.flags_inv, HIDEFACE))
return
if (!length(text))
return
visible_message(
"\The [src] displays \"[text]\" on their screen.",
"You display \"[text]\" on your screen."
)
8 changes: 8 additions & 0 deletions code/modules/organs/robolimbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ var/global/datum/robolimb/basic_robolimb
var/list/restricted_to = list()
var/list/applies_to_part = list() //TODO.
var/list/allowed_bodytypes = list(SPECIES_HUMAN, SPECIES_IPC, SPECIES_SKRELL, SPECIES_UNATHI)
var/has_screen = FALSE
var/display_text

/datum/robolimb/bishop
company = "Bishop"
Expand All @@ -50,6 +52,7 @@ var/global/datum/robolimb/basic_robolimb
icon = 'icons/mob/human_races/cyberlimbs/bishop/bishop_monitor.dmi'
allowed_bodytypes = list(SPECIES_IPC)
unavailable_at_fab = 1
has_screen = TRUE

/datum/robolimb/hephaestus
company = "Hephaestus Industries"
Expand All @@ -76,6 +79,7 @@ var/global/datum/robolimb/basic_robolimb
allowed_bodytypes = list(SPECIES_IPC)
can_eat = null
unavailable_at_fab = 1
has_screen = TRUE

/datum/robolimb/zenghu
company = "Zeng-Hu"
Expand Down Expand Up @@ -114,6 +118,7 @@ var/global/datum/robolimb/basic_robolimb
allowed_bodytypes = list(SPECIES_IPC)
can_eat = null
unavailable_at_fab = 1
has_screen = TRUE

/datum/robolimb/nanotrasen
company = "NanoTrasen"
Expand Down Expand Up @@ -144,6 +149,7 @@ var/global/datum/robolimb/basic_robolimb
allowed_bodytypes = list(SPECIES_IPC)
can_eat = null
unavailable_at_fab = 1
has_screen = TRUE

/datum/robolimb/morpheus
company = "Morpheus"
Expand Down Expand Up @@ -192,6 +198,7 @@ var/global/datum/robolimb/basic_robolimb
unavailable_at_fab = 1
has_eyes = FALSE
allowed_bodytypes = list(SPECIES_IPC)
has_screen = TRUE

/datum/robolimb/veymed
company = "Vey-Med"
Expand Down Expand Up @@ -219,6 +226,7 @@ var/global/datum/robolimb/basic_robolimb
applies_to_part = list(BP_HEAD)
unavailable_at_fab = 1
allowed_bodytypes = list(SPECIES_IPC)
has_screen = TRUE

/datum/robolimb/vox
company = "Arkmade"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/species/station/machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@

bodyfall_sound = 'sound/effects/bodyfall_machine.ogg'

inherent_verbs = list(
/mob/living/carbon/human/proc/MachineChangeScreen,
/mob/living/carbon/human/proc/MachineDisableScreen,
/mob/living/carbon/human/proc/MachineShowText
)

/datum/species/machine/handle_death(mob/living/carbon/human/H)
..()
if(istype(H.wear_mask,/obj/item/clothing/mask/monitor))
Expand Down
Loading

0 comments on commit e81d057

Please sign in to comment.