mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 04:21:42 +00:00
* Change uplink implants to inherit the uplink flags of the uplink they were bought from (#59735) Uplinks implants bought from uplinks inherit the uplink flags of the uplink they were bought from. This fixes an undocumented bug where by purchasing an uplink implant, nuke ops would be able to get things they normally can't. Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com> Co-authored-by: Jordan Brown <Cyberboss@ users.noreply.github.com> * Uplink implants now inherit the uplink flags of the uplink they were bought from Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com> Co-authored-by: Jordan Brown <Cyberboss@ users.noreply.github.com>
64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
/obj/item/implanter//SKYRAT EDIT - ICON OVERRIDEN BY AESTHETICS - SEE MODULE
|
|
name = "implanter"
|
|
desc = "A sterile automatic implant injector."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "implanter0"
|
|
inhand_icon_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
|
|
custom_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_state()
|
|
icon_state = "implanter[imp ? 1 : 0]"
|
|
return ..()
|
|
|
|
|
|
/obj/item/implanter/attack(mob/living/M, mob/user)
|
|
if(!istype(M))
|
|
return
|
|
if(user && imp)
|
|
if(M != user)
|
|
M.visible_message(span_warning("[user] is attempting to implant [M]."))
|
|
|
|
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_notice("You implant yourself."))
|
|
else
|
|
M.visible_message(span_notice("[user] implants [M]."), span_notice("[user] implants you."))
|
|
imp = null
|
|
update_appearance()
|
|
else
|
|
to_chat(user, span_warning("[src] fails to implant [M]."))
|
|
|
|
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/pen))
|
|
if(!user.is_literate())
|
|
to_chat(user, span_notice("You prod at [src] with [W]!"))
|
|
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 && imp_type)
|
|
imp = new imp_type(src)
|
|
update_appearance()
|