Tweaked welding:

Welders that are on but not in use use fuel more slowly than before, when actively welding, fuel use rate increases to roughly 4 times what the previous rate was. This allows for an average of 4 regular walls to be cut through before refueling is needed, based on my testing. Shorter-length welding tasks will allow for more uses between refuels.

Also cleaned up a few things that still used the "click welder at thing, lose x units of fuel" code.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1403 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3
2011-04-07 01:30:39 +00:00
parent c1b1f4323c
commit f6620d08b1
17 changed files with 58 additions and 17 deletions
+2 -2
View File
@@ -151,7 +151,7 @@
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
if (!W:remove_fuel(1,user))
if (!W:remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
new /obj/item/stack/sheet/metal(src.loc)
@@ -169,7 +169,7 @@
W.loc = src.loc
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
if (!W:remove_fuel(1,user))
if (!W:remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
src.welded =! src.welded
+2
View File
@@ -85,6 +85,7 @@ obj/door_assembly
/obj/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && W:welding && !anchored )
if (W:remove_fuel(0,user))
W:welding = 2
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
playsound(src.loc, 'Welder2.ogg', 50, 1)
if(do_after(user, 40))
@@ -93,6 +94,7 @@ obj/door_assembly
if(src.glass==1)
new /obj/item/stack/sheet/rglass(get_turf(src))
del(src)
W:welding = 1
else
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
return
+14 -5
View File
@@ -153,9 +153,18 @@ WELDINGTOOOL
process()
if(!welding)
processing_items.Remove(src)
return
switch(welding)
if(0)
processing_items.Remove(src)
return
if(1)
if(prob(5))//Welders left on now use up fuel, but lets not have them run out quite that fast
remove_fuel(1)
if(2)
if(prob(75))
remove_fuel(1)
//if you're actually actively welding, use fuel faster.
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/M = location
@@ -163,8 +172,7 @@ WELDINGTOOOL
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
if(prob(20))//Welders left on now use up fuel, but lets not have them run out quite that fast
remove_fuel(1)
afterattack(obj/O as obj, mob/user as mob)
@@ -309,6 +317,7 @@ WELDINGTOOOL
max_fuel = 40
m_amt = 70
g_amt = 60
/obj/item/weapon/weldingtool/hugetank
name = "Upgraded Welding Tool"
max_fuel = 80
+1 -1
View File
@@ -16,7 +16,7 @@ FLOOR TILES
if(amount < 2)
user << "\red You need at least two rods to do this."
return
if(W:remove_fuel(2,user))
if(W:remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
+4
View File
@@ -147,17 +147,21 @@
if (istype(W, /obj/item/weapon/weldingtool))
if(W:welding == 1)
if(src.status == 2)
W:welding = 2
user << "\blue Now weakening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
sleep(50)
user << "\blue Table weakened"
src.status = 1
W:welding = 1
else
W:welding = 2
user << "\blue Now strengthening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
sleep(50)
user << "\blue Table strengthened"
src.status = 2
W:welding = 1
return
if(isrobot(user))
return