mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
You can now attach a string to coins using cable coil (remove with wirecutters). With a string attached you have a chance to recover the coin when buying an item from a vending machine that requires a coin.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2212 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
force = 0.0
|
||||
throwforce = 0.0
|
||||
w_class = 1.0
|
||||
var/string_attached
|
||||
|
||||
/obj/item/weapon/coin/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
@@ -135,6 +136,34 @@
|
||||
name = "Adamantine coin"
|
||||
icon_state = "coin_adamantine"
|
||||
|
||||
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/cable_coil) )
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
if(string_attached)
|
||||
user << "\blue There already is a string attached to this coin."
|
||||
return
|
||||
|
||||
if(CC.amount <= 0)
|
||||
user << "\blue This cable coil appears to be empty."
|
||||
del(CC)
|
||||
return
|
||||
|
||||
overlays += image('items.dmi',"coin_string_overlay")
|
||||
string_attached = 1
|
||||
user << "\blue You attach a string to the coin."
|
||||
CC.use(1)
|
||||
else if(istype(W,/obj/item/weapon/wirecutters) )
|
||||
if(!string_attached)
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/cable_coil/CC = new/obj/item/weapon/cable_coil(user.loc)
|
||||
CC.amount = 1
|
||||
CC.updateicon()
|
||||
overlays = list()
|
||||
string_attached = null
|
||||
user << "\blue You detach the string from the coin."
|
||||
else ..()
|
||||
|
||||
/******************************Materials****************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user