[READY]Refactors uplinks to a component!
This commit is contained in:
committed by
CitadelStationBot
parent
2e9f3bc1c0
commit
cec6c028f5
@@ -99,19 +99,13 @@
|
||||
if(deg && (deg > 0 && deg <= 360))
|
||||
degrees = deg
|
||||
to_chat(user, "<span class='notice'>You rotate the top of the pen to [degrees] degrees.</span>")
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink && degrees == traitor_unlock_degrees)
|
||||
to_chat(user, "<span class='warning'>Your pen makes a clicking noise, before quickly rotating back to 0 degrees!</span>")
|
||||
degrees = 0
|
||||
hidden_uplink.locked = FALSE
|
||||
hidden_uplink.interact(user)
|
||||
|
||||
|
||||
/obj/item/pen/attackby(obj/item/I, mob/user, params)
|
||||
if(hidden_uplink)
|
||||
return hidden_uplink.attackby(I, user, params)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/pen/attack(mob/living/M, mob/user,stealth)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user