Skip to content

Commit

Permalink
Making utility frames depend on shackles.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jan 22, 2024
1 parent 6b65202 commit 4f96b4c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion code/modules/brain_interface/_brain_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
desc = "A complex life support shell that interfaces between a brain and an electronic device."
organ_tag = BP_BRAIN
parent_organ = BP_HEAD
origin_tech = "{'biotech':3}"
origin_tech = @'{"biotech":3}'
icon = 'icons/obj/items/brain_interface_organic.dmi'
icon_state = ICON_STATE_WORLD
req_access = list(access_robotics)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/brain_interface/interface_radio.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/item/organ/internal/brain_interface/radio_enabled
name = "radio-enabled neural interface"
desc = "A complex life support shell that interfaces between a brain and an electronic device. This one comes with a built-in radio."
origin_tech = "{'biotech':4}"
origin_tech = @'{"biotech":4}'
var/VAR_PRIVATE/weakref/_radio

/obj/item/organ/internal/brain_interface/radio_enabled/empty
Expand Down
6 changes: 2 additions & 4 deletions code/modules/mob/living/brain/brain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

/mob/living/brain/handle_regular_status_updates()
. = ..()
if(health <= 0 && stat != DEAD)
death()
if(emp_damage || stat == DEAD || !is_in_interface())
SET_STATUS_MAX(src, STAT_SILENCE, 2)

Expand Down Expand Up @@ -101,12 +99,12 @@
emp_damage += rand(0,10)
emp_damage = clamp(emp_damage, 0, max_emp_damage)

/mob/living/brain/Life()
/mob/living/brain/handle_regular_status_updates() // Status & health update, are we dead or alive etc.
. = ..()
if(stat == DEAD || !isSynthetic())
emp_damage = 0
return
if(!emp_damage)
if(emp_damage <= 0)
return
emp_damage -= 1
var/msg_threshold = clamp(CEILING(emp_damage / (max_emp_damage / length(emp_reboot_strings))), 1, length(emp_reboot_strings))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/organs/internal/brain_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name = "computer intelligence core"
desc = "The pinnacle of artifical intelligence technology, conveniently stored in a fist-sized cube."
icon = 'icons/obj/items/brain_interface_robotic.dmi'
origin_tech = "{'engineering':4,'materials':4,'wormholes':2,'programming':4}"
origin_tech = @'{"engineering":4,"materials":4,"wormholes":2,"programming":4}'
material = /decl/material/solid/metal/steel
matter = list(
/decl/material/solid/glass = MATTER_AMOUNT_REINFORCEMENT,
Expand Down Expand Up @@ -51,7 +51,7 @@
update_icon()
var/decl/ghosttrap/G = GET_DECL(/decl/ghosttrap/machine_intelligence)
G.request_player(brainmob, "Someone is requesting a personality for a [name].", 1 MINUTE)
addtimer(CALLBACK(src, .proc/reset_search), 1 MINUTE)
addtimer(CALLBACK(src, PROC_REF(reset_search)), 1 MINUTE)
return TRUE
. = ..()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'sound/foley/metal1.ogg'
)
has_organ = list(
BP_BRAIN = /obj/item/organ/internal/mmi_holder,
BP_BRAIN = /obj/item/organ/internal/brain_interface,
BP_EYES = /obj/item/organ/internal/eyes,
BP_CELL = /obj/item/organ/internal/cell
)
Expand Down
5 changes: 0 additions & 5 deletions mods/content/shackles/laws_pref.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,3 @@

/decl/bodytype
var/can_be_shackled

#ifdef MODPACK_UTILITY_FRAMES
/decl/species/utility_frame
can_be_shackled = TRUE
#endif
1 change: 1 addition & 0 deletions mods/species/utility_frames/_utility_frames.dme
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef MODPACK_UTILITY_FRAMES
#define MODPACK_UTILITY_FRAMES
#include "../../content/shackles/_shackles.dme"
#include "_utility_frames.dm"
#include "species.dm"
#include "species_bodytypes.dm"
Expand Down
5 changes: 0 additions & 5 deletions mods/species/utility_frames/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,3 @@

/decl/species/utility_frame/disfigure_msg(var/mob/living/carbon/human/H)
. = SPAN_DANGER("The faceplate is dented and cracked!\n")

#ifdef MODPACK_SHACKLES
/decl/species/utility_frame
can_be_shackled = TRUE
#endif

0 comments on commit 4f96b4c

Please sign in to comment.