Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx committed Mar 21, 2024
1 parent 08d62fd commit 99ff3ee
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 3 deletions.
1 change: 1 addition & 0 deletions mods/ipc_mods/_ipc_mods.dme
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
#include "code/cultures_ipc.dm"
#include "code/ipc.dm"
#include "code/uplink.dm"
#include "code/machine_functions.dm"
#endif
7 changes: 4 additions & 3 deletions mods/ipc_mods/code/cooling_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
coolant_reagents_efficiency[/datum/reagent/space_cleaner] = 5
coolant_reagents_efficiency[/datum/reagent/sterilizine] = 3
coolant_reagents_efficiency[/datum/reagent/coolant] = 0.1
coolant_reagents_efficiency[/datum/reagent/frostoil] = -8
reagents.add_reagent(/datum/reagent/coolant, 60)
reagents.add_reagent(/datum/reagent/water, 30)
..()
Expand All @@ -47,8 +48,8 @@
var/cur_purity = coolant_reagents_efficiency[current_reagent.type]
if(!cur_purity)
cur_purity = 25
else if(cur_purity < 0.1)
cur_purity = 0.1
else if(cur_purity < - 10)
cur_purity = -10
total_purity += cur_purity * current_reagent.volume
fresh_coolant += current_reagent.volume
if(total_purity && fresh_coolant)
Expand All @@ -74,7 +75,7 @@

var/obj/item/organ/internal/cell/C = owner.internal_organs_by_name[BP_CELL]
refrigerant_rate = heating_modificator
if (C && C.get_charge() < 25)
if (C && C.get_charge() < 10)
return
if(reagents.total_volume >= 0)
var/bruised_cost = get_coolant_drain()
Expand Down
1 change: 1 addition & 0 deletions mods/ipc_mods/code/dev_exonet_connection_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
/obj/item/modular_computer/ecs
name = "exonet connection system"
desc = "A cirquit with some ports and wires."
icon = 'mods/ipc_mods/icons/ipc_icons.dmi'
icon_state = "ecs_on"
icon_state_unpowered = "ecs_off"
anchored = FALSE
Expand Down
17 changes: 17 additions & 0 deletions mods/ipc_mods/code/exonet_connection_system.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#define EXONET_ACTION_NAME "Enter Exonet"
/obj/item/organ/internal/ecs
name = "exonet connection port"
icon = 'mods/ipc_mods/icons/ipc_icons.dmi'
icon_state = "setup_large"
organ_tag = BP_EXONET
parent_organ = BP_HEAD
Expand All @@ -25,11 +27,24 @@
desc = "The internal port is designed to establish communication between the positronic brain and the computer. It's a third generation connection port."
computer = /obj/item/modular_computer/ecs/third


/obj/item/organ/internal/ecs/Initialize()
if(ispath(computer))
computer = new computer(src)
action_button_name = EXONET_ACTION_NAME
. = ..()

/obj/item/organ/internal/ecs/refresh_action_button()
. = ..()
if(.)
action.button_icon = 'mods/ipc_mods/icons/ipc_icons.dmi'
action.button_icon_state = "command"
if(action.button) action.button.UpdateIcon()

/obj/item/organ/internal/ecs/attack_self(mob/user)
if(action_button_name == EXONET_ACTION_NAME && owner)
owner.enter_exonet()
refresh_action_button()

/obj/item/organ/internal/ecs/Process()
..()
Expand Down Expand Up @@ -100,3 +115,5 @@
"<span class='notice'>You have installed [src] into [H]'s exonet port.</span>" \
)
T.computer.try_install_component(user, src)

#undef EXONET_ACTION_NAME
90 changes: 90 additions & 0 deletions mods/ipc_mods/code/machine_functions.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/mob/living/carbon/human/proc/detach_limb()
set category = "Abilities"
set name = "Detach Limb"
set desc = "Detach one of your robotic appendages."

if(last_special > world.time)
return

if(stat || paralysis || stunned || weakened || lying || restrained())
to_chat(src,"<span class='warning'>You can't do that in your current state!</span>")
return

var/obj/item/organ/external/E = get_organ(zone_sel.selecting)

if(!E)
to_chat(src,"<span class='warning'>You are missing that limb.</span>")
return

if(!BP_IS_ROBOTIC(E))
to_chat(src,"<span class='warning'>You can only detach robotic limbs.</span>")
return

if(E.is_stump() || E.is_broken())
to_chat(src,"<span class='warning'>The limb is too damaged to be removed manually!</span>")
return

if(E.vital)
to_chat(src,"<span class='warning'>Your safety system stops you from removing \the [E].</span>")
return

if(!do_after(src, 2 SECONDS, src)) return

last_special = world.time + 20

E.removed(src)
E.forceMove(get_turf(src))

update_body()
updatehealth()
UpdateDamageIcon()

visible_message("<span class='notice'>\The [src] detaches \his [E]!</span>",
"<span class='notice'>You detach your [E]!</span>")

/mob/living/carbon/human/proc/attach_limb()
set category = "Abilities"
set name = "Attach Limb"
set desc = "Attach a robotic limb to your body."

if(last_special > world.time)
return

if(stat || paralysis || stunned || weakened || lying || restrained())
to_chat(src,"<span class='warning'>You can not do that in your current state!</span>")
return

var/obj/item/organ/external/O = src.get_active_hand()

if(istype(O))

if(!BP_IS_ROBOTIC(O))
to_chat(src,"<span class='warning'>You are unable to interface with organic matter.</span>")
return

if(!O)
return


var/obj/item/organ/external/E = get_organ(zone_sel.selecting)

if(E)
to_chat(src,"<span class='warning'>You are not missing that limb.</span>")
return

if(!do_after(src, 2 SECONDS, src)) return

last_special = world.time + 20

src.drop_from_inventory(O)
O.replaced(src)
src.update_body()
src.updatehealth()
src.UpdateDamageIcon()

update_body()
updatehealth()
UpdateDamageIcon()

visible_message("<span class='notice'>\The [src] attaches \the [O] to \his body!</span>",
"<span class='notice'>You attach \the [O] to your body!</span>")
Binary file modified mods/ipc_mods/icons/ipc_icons.dmi
Binary file not shown.

0 comments on commit 99ff3ee

Please sign in to comment.