Adds three flame-themed illegal Mech weapons and more. (#4058)

* Adds three flame-themed illegal Mech weapons. Allows anything using apply_effects to be incendiary and ignite/apply firestacks. Also absolute-paths the spilled fuel effects.

* Removes world << because I'm a good coder honest.

* Why does Git do this for no reason.
This commit is contained in:
Mechoid
2017-10-13 21:32:52 -07:00
committed by Anewbe
parent e61efc752a
commit 56ec5ec94c
7 changed files with 162 additions and 61 deletions

View File

@@ -6,66 +6,66 @@
anchored = 1
var/amount = 1
New(turf/newLoc,amt=1,nologs=0)
if(!nologs)
message_admins("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[newLoc.x];Y=[newLoc.y];Z=[newLoc.z]'>JMP</a>)")
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
src.amount = amt
/obj/effect/decal/cleanable/liquid_fuel/New(turf/newLoc,amt=1,nologs=0)
if(!nologs)
message_admins("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[newLoc.x];Y=[newLoc.y];Z=[newLoc.z]'>JMP</a>)")
log_game("Liquid fuel has spilled in [newLoc.loc.name] ([newLoc.x],[newLoc.y],[newLoc.z])")
src.amount = amt
var/has_spread = 0
//Be absorbed by any other liquid fuel in the tile.
for(var/obj/effect/decal/cleanable/liquid_fuel/other in newLoc)
if(other != src)
other.amount += src.amount
other.Spread()
has_spread = 1
break
. = ..()
if(!has_spread)
Spread()
else
qdel(src)
proc/Spread(exclude=list())
//Allows liquid fuels to sometimes flow into other tiles.
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in cardinal)
var/turf/simulated/target = get_step(src,d)
var/turf/simulated/origin = get_turf(src)
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
var/obj/effect/decal/cleanable/liquid_fuel/other_fuel = locate() in target
if(other_fuel)
other_fuel.amount += amount*0.25
if(!(other_fuel in exclude))
exclude += src
other_fuel.Spread(exclude)
else
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
amount *= 0.75
flamethrower_fuel
icon_state = "mustard"
anchored = 0
New(newLoc, amt = 1, d = 0)
set_dir(d) //Setting this direction means you won't get torched by your own flamethrower.
. = ..()
var/has_spread = 0
//Be absorbed by any other liquid fuel in the tile.
for(var/obj/effect/decal/cleanable/liquid_fuel/other in newLoc)
if(other != src)
other.amount += src.amount
other.Spread()
has_spread = 1
break
. = ..()
if(!has_spread)
Spread()
//The spread for flamethrower fuel is much more precise, to create a wide fire pattern.
if(amount < 0.1) return
var/turf/simulated/S = loc
if(!istype(S)) return
else
qdel(src)
for(var/d in list(turn(dir,90),turn(dir,-90), dir))
var/turf/simulated/O = get_step(S,d)
if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O)
continue
if(O.CanPass(null, S, 0, 0) && S.CanPass(null, O, 0, 0))
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(O,amount*0.25,d)
O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately.
/obj/effect/decal/cleanable/liquid_fuel/proc/Spread(exclude=list())
//Allows liquid fuels to sometimes flow into other tiles.
if(amount < 15) return //lets suppose welder fuel is fairly thick and sticky. For something like water, 5 or less would be more appropriate.
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in cardinal)
var/turf/simulated/target = get_step(src,d)
var/turf/simulated/origin = get_turf(src)
if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0))
var/obj/effect/decal/cleanable/liquid_fuel/other_fuel = locate() in target
if(other_fuel)
other_fuel.amount += amount*0.25
if(!(other_fuel in exclude))
exclude += src
other_fuel.Spread(exclude)
else
new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25,1)
amount *= 0.75
amount *= 0.25
/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel
icon_state = "mustard"
anchored = 0
/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel/New(newLoc, amt = 1, d = 0)
set_dir(d) //Setting this direction means you won't get torched by your own flamethrower.
. = ..()
/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel/Spread()
//The spread for flamethrower fuel is much more precise, to create a wide fire pattern.
if(amount < 0.1) return
var/turf/simulated/S = loc
if(!istype(S)) return
for(var/d in list(turn(dir,90),turn(dir,-90), dir))
var/turf/simulated/O = get_step(S,d)
if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O)
continue
if(O.CanPass(null, S, 0, 0) && S.CanPass(null, O, 0, 0))
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(O,amount*0.25,d)
O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately.
amount *= 0.25