Moveable Machines Final II

Second attempt, let's go.
This commit is contained in:
skull132
2014-08-19 23:32:19 +03:00
parent 689c13cfcb
commit 2aebd69d57
5 changed files with 117 additions and 27 deletions
+2 -6
View File
@@ -36,13 +36,9 @@
if(0)
anchored = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure [src.name] to the floor.", \
"You hear a ratchet")
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
if(1)
anchored = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
"You unsecure [src.name] from the floor.", \
"You hear a ratchet")
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
return
+32 -2
View File
@@ -181,7 +181,7 @@
add_fingerprint(usr)
return 1 // update UIs attached to this object
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/B as obj, var/mob/user as mob)
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
if(isrobot(user))
return
@@ -210,6 +210,21 @@
nanomanager.update_uis(src) // update all UIs attached to src
return
if(istype(B, /obj/item/weapon/wrench))
if(moveable == 1)
switch(anchored)
if(0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
anchored = 1
if(1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
anchored = 0
return
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -327,6 +342,21 @@
/obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
if(istype(B, /obj/item/weapon/wrench))
if(moveable == 1)
switch(anchored)
if(0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet")
anchored = 1
if(1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
spawn(10)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet")
anchored = 0
return
if(istype(B, /obj/item/weapon/reagent_containers/glass))
if(src.beaker)
@@ -339,7 +369,7 @@
src.updateUsrDialog()
icon_state = "mixer1"
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
if(istype(B, /obj/item/weapon/storage/pill_bottle))
if(src.loaded_pill_bottle)
user << "A pill bottle is already loaded into the machine."