mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-14 10:53:42 +00:00
* Initial work * more * ass * wsedfwedff * asss * test * stuff * fuck * sss a * kms * asdadwedwdfwefwef * start * test * dwwdew * ewefwfef * Redemption machine (#8) * Redemption machine * Removes debug messages * changes * fuckmyshitup * coin mint works with new material shenanigans (#10) * Auto stash before merge of "materials" and "origin/materials" * woops * furnace (#11) * autolathe manufacturing of toolboxes * eggs in a basket * some small changes * matcolors * documentation * more documentation and effects * done * Color man bad (#12) * fixes designs * ass * more fixes * fuck me * firestacks adder * epic fixes * fixes designs * DONE DIDDILY DOO * removes category macro * ch-ch-ch-changes * fixes some stuff * Fixes display of ore values (#9) * Redemption machine * Removes debug messages * Re-adds value display * Replaces the fire stacking component with an element instead (#13) * fixes examine * fixes ligma bugs * double ligma boofus * fix * misses some defines * fixes ORM * Update code/datums/components/material_container.dm Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com> * fixes * Makes glass objects weaker (#14) * Makes glass objects weaker * uses correct proc * fixes shit * honk honk * better * oh shit oh fuck * fixes * fuck ORMs * fixes the biogen * documentation * ass (#15) * component * changes * ass * ass * doc * Auto stash before merge of "materials-plasmacomponent" and "origin/materials-plasmacomponent" * fixes rounding * fixed
66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
/obj/item/implanter
|
|
name = "implanter"
|
|
desc = "A sterile automatic implant injector."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "implanter0"
|
|
item_state = "syringe_0"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
throw_speed = 3
|
|
throw_range = 5
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
materials = list(/datum/material/iron=600, /datum/material/glass=200)
|
|
var/obj/item/implant/imp = null
|
|
var/imp_type = null
|
|
|
|
|
|
/obj/item/implanter/update_icon()
|
|
if(imp)
|
|
icon_state = "implanter1"
|
|
else
|
|
icon_state = "implanter0"
|
|
|
|
|
|
/obj/item/implanter/attack(mob/living/M, mob/user)
|
|
if(!istype(M))
|
|
return
|
|
if(user && imp)
|
|
if(M != user)
|
|
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
|
|
|
var/turf/T = get_turf(M)
|
|
if(T && (M == user || do_mob(user, M, 50)))
|
|
if(src && imp)
|
|
if(imp.implant(M, user))
|
|
if (M == user)
|
|
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
|
else
|
|
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
|
imp = null
|
|
update_icon()
|
|
else
|
|
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
|
|
|
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/pen))
|
|
if(!user.is_literate())
|
|
to_chat(user, "<span class='notice'>You prod at [src] with [W]!</span>")
|
|
return
|
|
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
|
if(user.get_active_held_item() != W)
|
|
return
|
|
if(!user.canUseTopic(src, BE_CLOSE))
|
|
return
|
|
if(t)
|
|
name = "implanter ([t])"
|
|
else
|
|
name = "implanter"
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/implanter/Initialize(mapload)
|
|
. = ..()
|
|
if(imp_type)
|
|
imp = new imp_type(src)
|
|
update_icon()
|