mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Adds a bunch of buildable wood stuff, resprites planks (#28528)
* New wooden furniture * Bonfire repath * Wood retexture * Wood Resprite * Fixes * Description fix * Fixes * Undo match changes * Undo match icon changes * Typepath script * rackable spears * bounding box adjustment * Spear Rack * Memorial tweaks * Apply suggestions from code review Co-authored-by: Toastical <vnndvp@gmail.com> Signed-off-by: ExusA <67055922+ExusA@users.noreply.github.com> * More memorial tweaks --------- Signed-off-by: ExusA <67055922+ExusA@users.noreply.github.com> Co-authored-by: Toastical <toastical@toaster.com> Co-authored-by: Toastical <vnndvp@gmail.com>
This commit is contained in:
co-authored by
Toastical
Toastical
parent
0ff8eec5ff
commit
a1ff715bf1
@@ -669,7 +669,7 @@
|
||||
M.matchignite()
|
||||
playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, 1)
|
||||
return
|
||||
if(M.lit && !M.burnt)
|
||||
if(M.lit && !M.burnt && M.w_class <= WEIGHT_CLASS_SMALL)
|
||||
user.visible_message("<span class='warning'>[user] crushes [M] into the bottom of [src], extinguishing it.</span>","<span class='warning'>You crush [M] into the bottom of [src], extinguishing it.</span>")
|
||||
M.dropped()
|
||||
return
|
||||
|
||||
@@ -842,7 +842,7 @@
|
||||
name = "Bonfire"
|
||||
time = 60
|
||||
reqs = list(/obj/item/grown/log = 5)
|
||||
result = list(/obj/structure/bonfire)
|
||||
result = list(/obj/structure/lightable/bonfire)
|
||||
category = CAT_PRIMAL
|
||||
alert_admins_on_craft = TRUE
|
||||
|
||||
|
||||
@@ -170,3 +170,9 @@
|
||||
desc = "An inscription on the side reads \"Best Captain 2559\"... The last time the station had a worthy captain."
|
||||
icon_state = "mug_cap"
|
||||
preset = TRUE
|
||||
|
||||
/obj/item/reagent_containers/drinks/mug/wood
|
||||
name = "wooden cup"
|
||||
desc = "This is a tower-cap cup. All craftsdwarfship is... passable."
|
||||
icon_state = "mug_wood"
|
||||
preset = TRUE
|
||||
|
||||
@@ -119,9 +119,112 @@
|
||||
name = "wooden spikes"
|
||||
icon_state = "woodspike"
|
||||
|
||||
/////////BONFIRES//////////
|
||||
//MARK: Bonfires and torches
|
||||
|
||||
/obj/structure/bonfire
|
||||
/obj/structure/lightable
|
||||
name = "lightable fire"
|
||||
var/burning = FALSE
|
||||
var/lighter // Who lit the fucking thing
|
||||
var/fire_stack_strength = 5
|
||||
var/dangerous = TRUE // Does this burn things that cross it?
|
||||
var/heat_factor = 1000 // How much does this heat up the air?
|
||||
var/light_strength = 6
|
||||
light_color = "#ED9200"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/structure/lightable/proc/CheckOxygen()
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/G = T.get_readonly_air()
|
||||
if(G.oxygen() > MIN_OXY_IGNITE)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/lightable/Initialize(mapload)
|
||||
. = ..()
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/structure/lightable/proc/on_atom_entered(datum/source, atom/movable/entered)
|
||||
SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
|
||||
|
||||
if(burning && dangerous)
|
||||
Burn()
|
||||
if(ishuman(entered))
|
||||
var/mob/living/carbon/human/H = entered
|
||||
add_attack_logs(src, H, "Burned by a bonfire (Lit by [lighter])", ATKLOG_ALMOSTALL)
|
||||
|
||||
/obj/structure/lightable/proc/StartBurning(mob/user)
|
||||
if(burning)
|
||||
return
|
||||
if(!CheckOxygen())
|
||||
to_chat(user, "<span class='warning'>You can't seem to ignite [src] in this environment!</span>")
|
||||
return
|
||||
|
||||
icon_state = "[initial(icon_state)]_burning"
|
||||
burning = TRUE
|
||||
set_light(light_strength, l_color = light_color)
|
||||
Burn()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/lightable/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/lightable/proc/Burn()
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(heat_factor, 10)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
if(dangerous)
|
||||
O.fire_act(1000, 500)
|
||||
else
|
||||
O.temperature_expose(exposed_temperature = 400)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(dangerous)
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.IgniteMob()
|
||||
else
|
||||
L.adjust_bodytemperature(10, 310)
|
||||
|
||||
/obj/structure/lightable/process()
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
Burn()
|
||||
|
||||
/obj/structure/lightable/extinguish()
|
||||
if(burning)
|
||||
icon_state = initial(icon_state)
|
||||
burning = 0
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/lightable/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
. = ..()
|
||||
if(istype(used, /obj/item/stack/rods) && !can_buckle)
|
||||
var/obj/item/stack/rods/R = used
|
||||
R.use(1)
|
||||
can_buckle = TRUE
|
||||
buckle_requires_restraints = TRUE
|
||||
to_chat(user, "<span class='italics'>You add a rod to [src].</span>")
|
||||
var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16)
|
||||
underlays += U
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(used.get_heat())
|
||||
lighter = user.ckey
|
||||
user.create_log(MISC_LOG, "lit a bonfire", src)
|
||||
StartBurning(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/structure/lightable/bonfire
|
||||
name = "bonfire"
|
||||
desc = "For grilling, broiling, charring, smoking, heating, roasting, toasting, simmering, searing, melting, and occasionally burning things."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
@@ -129,45 +232,21 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/burning = FALSE
|
||||
var/lighter // Who lit the fucking thing
|
||||
var/fire_stack_strength = 5
|
||||
|
||||
/obj/structure/bonfire/Initialize(mapload)
|
||||
. = ..()
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/structure/bonfire/dense
|
||||
/obj/structure/lightable/bonfire/dense
|
||||
density = TRUE
|
||||
|
||||
/// haha empty define
|
||||
/obj/structure/bonfire/lit
|
||||
/obj/structure/lightable/bonfire/lit
|
||||
|
||||
/obj/structure/bonfire/lit/dense
|
||||
/obj/structure/lightable/bonfire/lit/dense
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/bonfire/lit/Initialize(mapload)
|
||||
/obj/structure/lightable/bonfire/lit/Initialize(mapload)
|
||||
. = ..()
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/bonfire/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/rods) && !can_buckle)
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
can_buckle = TRUE
|
||||
buckle_requires_restraints = TRUE
|
||||
to_chat(user, "<span class='italics'>You add a rod to [src].</span>")
|
||||
var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16)
|
||||
underlays += U
|
||||
if(W.get_heat())
|
||||
lighter = user.ckey
|
||||
user.create_log(MISC_LOG, "lit a bonfire", src)
|
||||
StartBurning(user)
|
||||
|
||||
/obj/structure/bonfire/attack_hand(mob/user)
|
||||
/obj/structure/lightable/bonfire/attack_hand(mob/user)
|
||||
if(burning)
|
||||
to_chat(user, "<span class='warning'>You need to extinguish [src] before removing the logs!</span>")
|
||||
return
|
||||
@@ -179,74 +258,34 @@
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/// Check if we're standing in an oxygenless environment
|
||||
/obj/structure/bonfire/proc/CheckOxygen()
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/G = T.get_readonly_air()
|
||||
if(G.oxygen() > MIN_OXY_IGNITE)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/bonfire/proc/StartBurning(mob/user)
|
||||
if(burning)
|
||||
return
|
||||
if(!CheckOxygen())
|
||||
to_chat(user, "<span class='warning'>You can't seem to ignite [src] in this environment!</span>")
|
||||
return
|
||||
|
||||
icon_state = "bonfire_on_fire"
|
||||
burning = TRUE
|
||||
set_light(6, l_color = "#ED9200")
|
||||
Burn()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/bonfire/proc/on_atom_entered(datum/source, atom/movable/entered)
|
||||
SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
|
||||
|
||||
if(burning)
|
||||
Burn()
|
||||
if(ishuman(entered))
|
||||
var/mob/living/carbon/human/H = entered
|
||||
add_attack_logs(src, H, "Burned by a bonfire (Lit by [lighter])", ATKLOG_ALMOSTALL)
|
||||
|
||||
/obj/structure/bonfire/proc/Burn()
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000, 10)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(1000, 500)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/process()
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
Burn()
|
||||
|
||||
/obj/structure/bonfire/extinguish()
|
||||
if(burning)
|
||||
icon_state = "bonfire"
|
||||
burning = 0
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
/obj/structure/lightable/bonfire/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(..())
|
||||
M.pixel_y += 13
|
||||
|
||||
/obj/structure/bonfire/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
/obj/structure/lightable/bonfire/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
if(..())
|
||||
buckled_mob.pixel_y -= 13
|
||||
|
||||
/obj/structure/lightable/torch
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "torch"
|
||||
name = "torch sconce"
|
||||
desc = "A standing torch sconce, made from towercap wood."
|
||||
dangerous = FALSE
|
||||
light_strength = 4
|
||||
light_color = "#f5df15"
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/lightable/torch/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/lightable/torch/deconstruct()
|
||||
density = FALSE
|
||||
new /obj/item/stack/sheet/wood (get_turf(src), 5)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
#undef MIN_OXY_IGNITE
|
||||
|
||||
Reference in New Issue
Block a user