Reloadable lasers- needs sprites

Reloadable lasers plus upgrade thing stuff.  Tested, works.  Not added
to game yet.  Not twohanded yet-- maybe we should leave it onehanded?

Numbers for the laser are still up in the air.  It's pretty neat.  You
can load it with different types of lasers and stuff.
This commit is contained in:
Duck-
2014-12-23 00:53:22 -05:00
parent 0b344ff76a
commit a7dcf886ae
11 changed files with 243 additions and 45 deletions
+10 -10
View File
@@ -53,7 +53,7 @@
update_stats()
if(load && is_train_head())
load << "The drive motor briefly whines, then drones to a stop."
if(is_train_head() && !on)
return 0
@@ -118,7 +118,7 @@
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs -= /obj/vehicle/train/cargo/engine/verb/start_engine
if(on)
verbs += /obj/vehicle/train/cargo/engine/verb/stop_engine
else
@@ -129,7 +129,7 @@
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs -= /obj/vehicle/train/cargo/engine/verb/start_engine
if(!on)
verbs += /obj/vehicle/train/cargo/engine/verb/start_engine
else
@@ -180,7 +180,7 @@
if(!istype(usr, /mob/living/carbon/human))
return
if(get_dist(usr,src) <= 1)
usr << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition."
usr << "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
@@ -192,7 +192,7 @@
if(!istype(usr, /mob/living/carbon/human))
return
if(on)
usr << "The engine is already running."
return
@@ -210,10 +210,10 @@
set name = "Stop engine"
set category = "Object"
set src in view(1)
if(!istype(usr, /mob/living/carbon/human))
return
if(!on)
usr << "The engine is already stopped."
return
@@ -229,10 +229,10 @@
if(!istype(usr, /mob/living/carbon/human))
return
if(!key || (load && load != usr))
return
if(on)
turn_off()
@@ -291,7 +291,7 @@
/obj/vehicle/train/cargo/trolley/update_car(var/train_length, var/active_engines)
src.train_length = train_length
src.active_engines = active_engines
if(!lead && !tow)
anchored = 0
if(verbs.Find(/atom/movable/verb/pull))
+10 -10
View File
@@ -116,7 +116,7 @@
set desc = "Unhitches this train from the one in front of it."
set category = "Object"
set src in view(1)
if(!istype(usr, /mob/living/carbon/human))
return
@@ -139,11 +139,11 @@
if (lead)
user << "\red [src] is already hitched to something."
return
if (T.tow)
user << "\red [T] is already towing something."
return
//check for cycles.
var/obj/vehicle/train/next_car = T
while (next_car)
@@ -151,15 +151,15 @@
user << "\red That seems very silly."
return
next_car = next_car.lead
//latch with src as the follower
lead = T
T.tow = src
dir = lead.dir
if(user)
user << "\blue You hitch [src] to [T]."
update_stats()
@@ -168,10 +168,10 @@
if (!lead)
user << "\red [src] is not hitched to anything."
return
lead.tow = null
lead.update_stats()
user << "\blue You unhitch [src] from [lead]."
lead = null
@@ -190,7 +190,7 @@
//returns 1 if this is the lead car of the train
/obj/vehicle/train/proc/is_train_head()
if (lead)
if (lead)
return 0
return 1
@@ -209,7 +209,7 @@
if (T.tow == src)
lead.tow = null
lead.update_stats()
lead = null
update_stats()
return