Files
Bubberstation/code/modules/surgery/dental_implant.dm
phil235 91839f5f70 Action buttons will now only update when needed instead of every Life().
The action buttons now update their icon instantly.
Fixes versions of pickup(),equipped() and dropped not calling the parent.
Fixes drone not being able to remove a defib from their storage.
You can now cycle the mime mask by clicking it in your hand.
The action buttons for hardsuit and hooded suits now only appears when you're wearing the suit.
Created two mob helper procs getBeltSlot() and getBackSlot().
Created /datum/species/proc/on_species_loss() to handle stuff when our race change, currently only used by jelly and slime race to remove their exotic blood from our reagents and to remove slime people's action buttons.
2016-02-22 00:34:59 +01:00

43 lines
1.7 KiB
Plaintext

/datum/surgery/dental_implant
name = "dental implant"
steps = list(/datum/surgery_step/drill, /datum/surgery_step/insert_pill)
possible_locs = list("mouth")
/datum/surgery_step/insert_pill
name = "insert pill"
implements = list(/obj/item/weapon/reagent_containers/pill = 100)
time = 16
/datum/surgery_step/insert_pill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to wedge \the [tool] in [target]'s [parse_zone(target_zone)].", "<span class='notice'>You begin to wedge [tool] in [target]'s [parse_zone(target_zone)]...</span>")
/datum/surgery_step/insert_pill/success(mob/user, mob/living/carbon/target, target_zone, var/obj/item/weapon/reagent_containers/pill/tool, datum/surgery/surgery)
if(!istype(tool))
return 0
user.drop_item()
target.internal_organs += tool
tool.loc = target
var/datum/action/item_action/hands_free/activate_pill/P = new
P.button_icon_state = tool.icon_state
P.target = tool
P.Grant(target)
user.visible_message("[user] wedges \the [tool] into [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You wedge [tool] into [target]'s [parse_zone(target_zone)].</span>")
return 1
/datum/action/item_action/hands_free/activate_pill
name = "Activate Pill"
/datum/action/item_action/hands_free/activate_pill/Trigger()
if(!..())
return 0
owner << "<span class='caution'>You grit your teeth and burst the implanted [target]!</span>"
add_logs(owner, null, "swallowed an implanted pill", target)
if(target.reagents.total_volume)
target.reagents.reaction(owner, INGEST)
target.reagents.trans_to(owner, target.reagents.total_volume)
Remove(owner)
qdel(target)
return 1