[READY]Refactors uplinks to a component!

This commit is contained in:
oranges
2017-11-23 10:16:16 +13:00
committed by CitadelStationBot
parent 2e9f3bc1c0
commit cec6c028f5
24 changed files with 468 additions and 298 deletions
+2 -8
View File
@@ -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