mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 05:36:57 +01:00
Streamlines flora harvest check.
This commit is contained in:
@@ -72,10 +72,7 @@
|
||||
..(W, user)
|
||||
|
||||
/obj/structure/flora/proc/can_harvest(var/obj/item/I, var/ignore_tool = FALSE)
|
||||
. = FALSE
|
||||
if((ignore_tool || (harvest_tool && istype(I, harvest_tool))) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
. = TRUE
|
||||
return .
|
||||
return ((ignore_tool || (harvest_tool && istype(I, harvest_tool))) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
|
||||
/obj/structure/flora/proc/spawn_harvest(var/path = null, var/mob/user = null)
|
||||
if(!ispath(path))
|
||||
|
||||
@@ -31,10 +31,7 @@
|
||||
return icon_state
|
||||
|
||||
/obj/structure/flora/tree/can_harvest(var/obj/item/I, var/ignore_tool = FALSE)
|
||||
. = FALSE
|
||||
if(!is_stump && (ignore_tool || (harvest_tool && istype(I, harvest_tool))) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
. = TRUE
|
||||
return .
|
||||
return (!is_stump && (ignore_tool || (harvest_tool && istype(I, harvest_tool))) && harvest_loot && harvest_loot.len && harvest_count < max_harvests)
|
||||
|
||||
/obj/structure/flora/tree/attackby(var/obj/item/W, var/mob/living/user)
|
||||
if(can_harvest(W))
|
||||
|
||||
Reference in New Issue
Block a user