Files
GS13NG/code/modules/surgery/dental_implant.dm
T
PoojawaandGitHub f67e9f6d87 Bleeding edgy refresh (#303)
* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
2017-03-21 11:44:10 -05:00

42 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()
tool.loc = target
var/datum/action/item_action/hands_free/activate_pill/P = new
P.button.name = "Activate [tool.name]"
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
to_chat(owner, "<span class='caution'>You grit your teeth and burst the implanted [target.name]!</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