Files
Bubberstation/code/game/objects/items/implants/implantcase.dm
Qustinnus b33d1c49a3 [READY] Floydmats (Datum materials) & custom toolboxes (#45118)
* 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
2019-07-24 11:27:01 -04:00

84 lines
2.2 KiB
Plaintext

/obj/item/implantcase
name = "implant case"
desc = "A glass case containing an implant."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "implantcase-0"
item_state = "implantcase"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
throw_speed = 2
throw_range = 5
w_class = WEIGHT_CLASS_TINY
materials = list(/datum/material/glass=500)
var/obj/item/implant/imp = null
var/imp_type
/obj/item/implantcase/update_icon()
if(imp)
icon_state = "implantcase-[imp.item_color]"
reagents = imp.reagents
else
icon_state = "implantcase-0"
reagents = null
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the side of [src]!</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 = "implant case - '[t]'"
else
name = "implant case"
else if(istype(W, /obj/item/implanter))
var/obj/item/implanter/I = W
if(I.imp)
if(imp || I.imp.imp_in)
return
I.imp.forceMove(src)
imp = I.imp
I.imp = null
update_icon()
I.update_icon()
else
if(imp)
if(I.imp)
return
imp.forceMove(I)
I.imp = imp
imp = null
update_icon()
I.update_icon()
else
return ..()
/obj/item/implantcase/Initialize(mapload)
. = ..()
if(imp_type)
imp = new imp_type(src)
update_icon()
/obj/item/implantcase/tracking
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
imp_type = /obj/item/implant/tracking
/obj/item/implantcase/weapons_auth
name = "implant case - 'Firearms Authentication'"
desc = "A glass case containing a firearms authentication implant."
imp_type = /obj/item/implant/weapons_auth
/obj/item/implantcase/adrenaline
name = "implant case - 'Adrenaline'"
desc = "A glass case containing an adrenaline implant."
imp_type = /obj/item/implant/adrenalin