mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Added a fruit spawning debug proc.
This commit is contained in:
@@ -993,6 +993,20 @@ var/global/floorIsLava = 0
|
||||
else
|
||||
return "Error: Invalid sabotage target: [target]"
|
||||
*/
|
||||
|
||||
/datum/admins/proc/spawn_fruit()
|
||||
set category = "Debug"
|
||||
set desc = "(seed index) Spawn the product of a seed."
|
||||
set name = "Spawn Fruit"
|
||||
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/seedtype = input("Select a seed type", "Spawn Fruit") as null|anything in seed_types
|
||||
if(!seedtype || !seed_types[seedtype])
|
||||
return
|
||||
var/datum/seed/S = seed_types[seedtype]
|
||||
S.harvest(usr,0,0,1)
|
||||
|
||||
/datum/admins/proc/spawn_atom(var/object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn an atom"
|
||||
|
||||
@@ -107,6 +107,7 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/editappear
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
|
||||
@@ -624,7 +624,7 @@ proc/populate_seed_list()
|
||||
return (P ? P : 0)
|
||||
|
||||
//Place the plant products at the feet of the user.
|
||||
/datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample)
|
||||
/datum/seed/proc/harvest(var/mob/user,var/yield_mod,var/harvest_sample,var/force_amount)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
@@ -633,8 +633,8 @@ proc/populate_seed_list()
|
||||
if(!isnull(products) && products.len && yield > 0)
|
||||
got_product = 1
|
||||
|
||||
if(!got_product && !harvest_sample)
|
||||
user << "\red You fail to harvest anything useful."
|
||||
if(!force_amount && !got_product && !harvest_sample)
|
||||
user << "<span class='danger'>You fail to harvest anything useful.</span>"
|
||||
else
|
||||
user << "You [harvest_sample ? "take a sample" : "harvest"] from the [display_name]."
|
||||
|
||||
@@ -651,6 +651,9 @@ proc/populate_seed_list()
|
||||
return
|
||||
|
||||
var/total_yield = 0
|
||||
if(!isnull(force_amount))
|
||||
total_yield = force_amount
|
||||
else
|
||||
if(yield > -1)
|
||||
if(isnull(yield_mod) || yield_mod < 1)
|
||||
yield_mod = 0
|
||||
|
||||
Reference in New Issue
Block a user