Makes Xenobiology Simpler. Removes Slimes (#12398)

This commit is contained in:
Fox McCloud
2019-09-24 16:17:33 -07:00
committed by variableundefined
parent 69e3a08a06
commit cb8529cdb8
81 changed files with 1774 additions and 1903 deletions
+61
View File
@@ -0,0 +1,61 @@
/datum/surgery/core_removal
name = "core removal"
steps = list(/datum/surgery_step/slime/cut_flesh, /datum/surgery_step/slime/extract_core)
allowed_mob = list(/mob/living/simple_animal/slime)
possible_locs = list("chest", "head", "l_arm", "l_hand", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "groin")
/datum/surgery_step/slime
/datum/surgery_step/slime/is_valid_target(mob/living/simple_animal/slime/target)
return istype(target, /mob/living/simple_animal/slime)
/datum/surgery_step/slime/can_use(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
return istype(target) && target.stat == DEAD
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(/obj/item/scalpel = 100, /obj/item/melee/energy/sword = 75, /obj/item/kitchen/knife = 65, /obj/item/shard = 45)
time = 16
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", "You start cutting through [target]'s flesh with \the [tool].")
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'> [user] cuts through [target]'s flesh with \the [tool].</span>",
"<span class='notice'> You cut through [target]'s flesh with \the [tool], revealing its silky innards.</span>")
return TRUE
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing [target]'s flesh with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing [target]'s flesh with \the [tool]!</span>")
return FALSE
/datum/surgery_step/slime/extract_core
name = "extract core"
allowed_tools = list(/obj/item/hemostat = 100, /obj/item/crowbar = 100)
time = 16
/datum/surgery_step/slime/extract_core/begin_step(mob/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'>[user] begins to extract a core from [target].</span>",
"<span class='notice'>You begin to extract a core from [target]...</span>")
/datum/surgery_step/slime/extract_core/end_step(mob/user, mob/living/simple_animal/slime/slime, target_zone, obj/item/tool)
if(slime.cores > 0)
slime.cores--
user.visible_message("<span class='notice'>[user] successfully extracts a core from [slime]!</span>",
"<span class='notice'>You successfully extract a core from [slime]. [slime.cores] core\s remaining.</span>")
new slime.coretype(slime.loc)
if(slime.cores <= 0)
slime.icon_state = "[slime.colour] baby slime dead-nocore"
return TRUE
else
return FALSE
else
to_chat(user, "<span class='warning'>There aren't any cores left in [slime]!</span>")
return TRUE
/datum/surgery_step/slime/extract_core/fail_step(mob/living/user, mob/living/simple_animal/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing [target]'s flesh with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing [target]'s flesh with \the [tool]!</span>")
return FALSE
-103
View File
@@ -1,103 +0,0 @@
//////////////////////////////////////////////////////////////////
// SLIME CORE EXTRACTION //
//////////////////////////////////////////////////////////////////
/datum/surgery/core_removal
name = "core removal"
steps = list(/datum/surgery_step/slime/cut_flesh, /datum/surgery_step/slime/cut_innards, /datum/surgery_step/slime/saw_core)
allowed_mob = list(/mob/living/carbon/slime)
possible_locs = list("chest")//urgghhhhhhhhhhhh
/datum/surgery_step/slime
is_valid_target(mob/living/carbon/slime/target)
return istype(target, /mob/living/carbon/slime/)
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return target.stat == DEAD
/datum/surgery_step/slime/cut_flesh
allowed_tools = list(
/obj/item/scalpel = 100, \
/obj/item/kitchen/knife = 90, \
/obj/item/shard = 60, \
)
time = 16
/datum/surgery_step/slime/cut_flesh/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 0
/datum/surgery_step/slime/cut_flesh/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
"You start cutting through [target]'s flesh with \the [tool].")
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'> [user] cuts through [target]'s flesh with \the [tool].</span>", \
"<span class='notice'> You cut through [target]'s flesh with \the [tool], revealing its silky innards.</span>")
target.core_removal_stage = 1
return 1
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing [target]'s flesh with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing [target]'s flesh with \the [tool]!</span>")
return 0
/datum/surgery_step/slime/cut_innards
allowed_tools = list(
/obj/item/scalpel = 100, \
/obj/item/kitchen/knife = 90, \
/obj/item/shard = 60, \
)
time = 16
/datum/surgery_step/slime/cut_innards/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && istype(target) && target.core_removal_stage == 1
/datum/surgery_step/slime/cut_innards/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
"You start cutting [target]'s silky innards apart with \the [tool].")
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='notice'> [user] cuts [target]'s innards apart with \the [tool], exposing the cores.</span>", \
"<span class='notice'> You cut [target]'s innards apart with \the [tool], exposing the cores.</span>")
target.core_removal_stage = 2
return 1
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing [target]'s innards with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing [target]'s innards with \the [tool]!</span>")
return 0
/datum/surgery_step/slime/saw_core
allowed_tools = list(
/obj/item/circular_saw = 100, \
/obj/item/hatchet = 90
)
time = 16
/datum/surgery_step/slime/saw_core/can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
return ..() && (istype(target) && target.core_removal_stage == 2 && target.cores > 0) //This is being passed a human as target, unsure why.
/datum/surgery_step/slime/saw_core/begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
"You start cutting out one of [target]'s cores with \the [tool].")
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("<span class='notice'> [user] cuts out one of [target]'s cores with \the [tool].</span>", \
"<span class='notice'> You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</span>")
if(target.cores >= 0)
new target.coretype(target.loc)
if(target.cores <= 0)
target.icon_state = "[target.colour] baby slime dead-nocore"
return 1
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
user.visible_message("<span class='warning'> [user]'s hand slips, causing [user.p_them()] to miss the core!</span>", \
"<span class='warning'> Your hand slips, causing you to miss the core!</span>")
return 0