mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
preventing installation of robotic brain in organic chest
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
var/tough = FALSE //can organ be easily damaged?
|
||||
var/emp_proof = FALSE //is the organ immune to EMPs?
|
||||
var/hidden_pain = FALSE //will it skip pain messages?
|
||||
var/requires_robotic_bodypart = FALSE
|
||||
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
|
||||
@@ -144,4 +144,5 @@
|
||||
dead_icon = "posibrain"
|
||||
parent_organ = "chest"
|
||||
status = ORGAN_ROBOT
|
||||
species = "Machine"
|
||||
species = "Machine"
|
||||
requires_robotic_bodypart = TRUE // Can't stick this in someone's chest, unless their chest is robotic
|
||||
@@ -101,6 +101,9 @@
|
||||
if(is_int_organ(tool))
|
||||
current_type = "insert"
|
||||
I = tool
|
||||
if(I.requires_robotic_bodypart)
|
||||
to_chat(user, "<span class='warning'>[I] is an organ that requires a robotic interface[target].</span>")
|
||||
return -1
|
||||
if(target_zone != I.parent_organ || target.get_organ_slot(I.slot))
|
||||
to_chat(user, "<span class='notice'>There is no room for [I] in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return -1
|
||||
@@ -257,12 +260,14 @@
|
||||
|
||||
else if(current_type == "insert")
|
||||
I = tool
|
||||
user.drop_item()
|
||||
I.insert(target)
|
||||
spread_germs_to_organ(I, user, tool)
|
||||
if(!user.canUnEquip(I, 0))
|
||||
if(I.requires_robotic_bodypart)
|
||||
to_chat(user, "<span class='warning'>[I] is an organ that requires a robotic interface[target].</span>")
|
||||
return FALSE
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you can't put it in [target]!</span>")
|
||||
return 0
|
||||
I.insert(target)
|
||||
spread_germs_to_organ(I, user, tool)
|
||||
|
||||
if(affected)
|
||||
user.visible_message("<span class='notice'> [user] has transplanted [tool] into [target]'s [affected.name].</span>",
|
||||
|
||||
Reference in New Issue
Block a user