mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Can attach limbs now. No preparations needed yet.
This commit is contained in:
@@ -834,4 +834,52 @@ proc/build_surgery_steps_list()
|
||||
// LIMB SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
//uh, sometime later, okay?
|
||||
/datum/surgery_step/limb/
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (!affected)
|
||||
return 0
|
||||
if (!(affected.status & ORGAN_DESTROYED))
|
||||
return 0
|
||||
if (affected.parent)
|
||||
if (affected.parent.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/limb/attach
|
||||
required_tool = /obj/item/robot_parts
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/robot_parts/p = tool
|
||||
if (p.part)
|
||||
if (!(target_zone in p.part))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..()// && affected.status & ORGAN_ATTACHABLE
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
|
||||
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
|
||||
|
||||
end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
|
||||
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
|
||||
affected.robotize()
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
del(tool)
|
||||
|
||||
fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging connectors on [target]'s [affected.display_name]!", \
|
||||
"\red Your hand slips, damaging connectors on [target]'s [affected.display_name]!")
|
||||
target.apply_damage(10, BRUTE, affected)
|
||||
|
||||
|
||||
@@ -378,8 +378,8 @@
|
||||
if(!no_explode)
|
||||
explosion(get_turf(owner),-1,-1,2,3)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.set_up(5, 0, owner)
|
||||
spark_system.attach(owner)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
@@ -477,6 +477,17 @@
|
||||
else
|
||||
return name
|
||||
|
||||
proc/robotize()
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
src.status &= ~ORGAN_SPLINTED
|
||||
src.status &= ~ORGAN_ATTACHABLE
|
||||
src.status &= ~ORGAN_DESTROYED
|
||||
src.status |= ORGAN_ROBOT
|
||||
for (var/datum/organ/external/T in children)
|
||||
if(T)
|
||||
T.robotize()
|
||||
|
||||
/datum/organ/external/chest
|
||||
name = "chest"
|
||||
icon_name = "chest"
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
return
|
||||
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||
if(istype(M,/mob/living/carbon))
|
||||
if (user.a_intent == "help" || (user.a_intent != "harm" && is_surgery_tool(src)))
|
||||
if (user.a_intent != "harm")
|
||||
if(surgery_steps == null) build_surgery_steps_list()
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
//check if tool is right or close enough
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
var/construction_time = 100
|
||||
var/list/construction_cost = list("metal"=20000,"glass"=5000)
|
||||
var/list/part = null
|
||||
|
||||
/obj/item/robot_parts/l_arm
|
||||
name = "Cyborg Left Arm"
|
||||
@@ -14,6 +15,7 @@
|
||||
icon_state = "l_arm"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=18000)
|
||||
part = list("l_arm","l_hand")
|
||||
|
||||
/obj/item/robot_parts/r_arm
|
||||
name = "Cyborg Right Arm"
|
||||
@@ -21,6 +23,7 @@
|
||||
icon_state = "r_arm"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=18000)
|
||||
part = list("r_arm","r_hand")
|
||||
|
||||
/obj/item/robot_parts/l_leg
|
||||
name = "Cyborg Left Leg"
|
||||
@@ -28,6 +31,7 @@
|
||||
icon_state = "l_leg"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=15000)
|
||||
part = list("l_leg","l_foot")
|
||||
|
||||
/obj/item/robot_parts/r_leg
|
||||
name = "Cyborg Right Leg"
|
||||
@@ -35,6 +39,7 @@
|
||||
icon_state = "r_leg"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=15000)
|
||||
part = list("r_leg","r_foot")
|
||||
|
||||
/obj/item/robot_parts/chest
|
||||
name = "Cyborg Torso"
|
||||
|
||||
Reference in New Issue
Block a user