Merge pull request #5777 from Loganbacca/trainfix

Cargo train fixes
This commit is contained in:
Chinsky
2014-07-27 14:46:45 +04:00
4 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -10,7 +10,7 @@
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 8
load_offset_y = 7
var/car_limit = 3 //how many cars an engine can pull before performance degrades
active_engines = 1
@@ -34,7 +34,7 @@
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 5
load_offset_y = 4
//-------------------------------------------
// Standard procs
@@ -44,6 +44,8 @@
cell = new /obj/item/weapon/cell/high
verbs -= /atom/movable/verb/pull
key = new()
var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs
overlays += I
/obj/vehicle/train/cargo/engine/Move()
if(on && cell.charge < power_use)
@@ -248,6 +250,9 @@
if(istype(load, /mob/living/carbon/human))
load.pixel_y += 4
if(load)
return 1
/obj/vehicle/train/cargo/engine/load(var/atom/movable/C)
if(!ismob(C))
+1 -1
View File
@@ -80,7 +80,7 @@
return 1
/obj/vehicle/train/MouseDrop_T(var/atom/movable/C, mob/user as mob)
if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C))
if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C))
return
if(istype(C,/obj/vehicle/train))
latch(C, user)
+2
View File
@@ -58,6 +58,8 @@
return 0
/obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/hand_labeler))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open