mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
You can now set flags on fire -- in-hands on fire missing
This commit is contained in:
+106
-26
@@ -1,6 +1,83 @@
|
||||
/obj/item/flag
|
||||
icon = 'icons/obj/flag.dmi'
|
||||
w_class = 4.0
|
||||
var/lit = 0
|
||||
var/burntime = 30
|
||||
|
||||
/obj/item/flag/fire_act(null, temperature, volume)
|
||||
if(!lit)
|
||||
Ignite()
|
||||
return
|
||||
|
||||
/obj/item/flag/proc/Ignite()
|
||||
if(lit) return
|
||||
lit = 1
|
||||
update_icons()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/flag/process()
|
||||
burntime--
|
||||
if(burntime < 1)
|
||||
processing_objects.Remove(src)
|
||||
if(istype(src.loc,/turf))
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
del(src)
|
||||
return
|
||||
if(istype(src.loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/C = src.loc
|
||||
var/turf/location = get_turf(C)
|
||||
new /obj/effect/decal/cleanable/ash(location)
|
||||
var/obj/item/stack/rods/R = new /obj/item/stack/rods
|
||||
del(src)
|
||||
C.put_in_hands(R)
|
||||
return
|
||||
else
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/flag/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
|
||||
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/lighter/zippo))
|
||||
var/obj/item/weapon/lighter/zippo/Z = W
|
||||
if(Z.lit)
|
||||
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights the [name] with their [W]. Damn they're cool.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/lighter))
|
||||
var/obj/item/weapon/lighter/L = W
|
||||
if(L.lit)
|
||||
light("<span class='notice'>After some fiddling, [user] manages to light the [name] with [W].</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/match))
|
||||
var/obj/item/weapon/match/M = W
|
||||
if(M.lit)
|
||||
light("<span class='notice'>[user] lights the [name] with their [W].</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/sword))
|
||||
var/obj/item/weapon/melee/energy/sword/S = W
|
||||
if(S.active)
|
||||
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light the [name] in the process.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/assembly/igniter))
|
||||
light("<span class='notice'>[user] fiddles with [W], and manages to light the [name].</span>")
|
||||
|
||||
/obj/item/flag/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(flavor_text)
|
||||
update_icons()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/flag/proc/update_icons()
|
||||
overlays = null
|
||||
overlays += image('icons/obj/flag.dmi', src , "fire")
|
||||
// item_state = "[icon_state]_fire" Waiting for new in-hands
|
||||
|
||||
/obj/item/flag/nt
|
||||
name = "Nanotrasen flag"
|
||||
@@ -42,31 +119,6 @@
|
||||
desc = "The flag of the independant, sovereign nation of Equestria, whatever the fuck that is."
|
||||
icon_state = "ponyflag"
|
||||
|
||||
//Nations/Department flags
|
||||
/obj/item/flag/cargo
|
||||
name = "Cargonia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Cargonia."
|
||||
icon_state = "cargoflag"
|
||||
|
||||
/obj/item/flag/med
|
||||
name = "Medistan flag"
|
||||
desc = "The flag of the independant, sovereign nation of Medistan."
|
||||
icon_state = "medflag"
|
||||
|
||||
/obj/item/flag/sec
|
||||
name = "Brigston flag"
|
||||
desc = "The flag of the independant, sovereign nation of Brigston."
|
||||
icon_state = "secflag"
|
||||
|
||||
/obj/item/flag/rnd
|
||||
name = "Scientopia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Scientopia."
|
||||
icon_state = "rndflag"
|
||||
|
||||
/obj/item/flag/atmos
|
||||
name = "Atmosia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Atmosia."
|
||||
icon_state = "atmosflag"
|
||||
|
||||
//Species flags
|
||||
|
||||
@@ -83,4 +135,32 @@
|
||||
/obj/item/flag/vox
|
||||
name = "Vox flag"
|
||||
desc = "A flag proudly proclaiming the superior heritage of Vox."
|
||||
icon_state = "voxflag"
|
||||
icon_state = "voxflag"
|
||||
|
||||
|
||||
//Nations/Department flags
|
||||
|
||||
/obj/item/flag/nation/cargo
|
||||
name = "Cargonia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Cargonia."
|
||||
icon_state = "cargoflag"
|
||||
|
||||
/obj/item/flag/nation/med
|
||||
name = "Medistan flag"
|
||||
desc = "The flag of the independant, sovereign nation of Medistan."
|
||||
icon_state = "medflag"
|
||||
|
||||
/obj/item/flag/nation/sec
|
||||
name = "Brigston flag"
|
||||
desc = "The flag of the independant, sovereign nation of Brigston."
|
||||
icon_state = "secflag"
|
||||
|
||||
/obj/item/flag/nation/rnd
|
||||
name = "Scientopia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Scientopia."
|
||||
icon_state = "rndflag"
|
||||
|
||||
/obj/item/flag/nation/atmos
|
||||
name = "Atmosia flag"
|
||||
desc = "The flag of the independant, sovereign nation of Atmosia."
|
||||
icon_state = "atmosflag"
|
||||
Reference in New Issue
Block a user