mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 10:41:42 +00:00
79 lines
2.2 KiB
Plaintext
79 lines
2.2 KiB
Plaintext
|
|
/*
|
|
* Recipe datum
|
|
*/
|
|
/datum/stack_recipe
|
|
var/title = "ERROR"
|
|
var/result_type
|
|
var/req_amount = 1
|
|
var/res_amount = 1
|
|
var/max_res_amount = 1
|
|
var/time = 0
|
|
var/one_per_turf = 0
|
|
var/on_floor = 0
|
|
var/on_floor_or_lattice = 0
|
|
var/window_checks = FALSE
|
|
var/cult_structure = FALSE
|
|
|
|
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, on_floor_or_lattice = 0, window_checks = FALSE, cult_structure = FALSE)
|
|
src.title = title
|
|
src.result_type = result_type
|
|
src.req_amount = req_amount
|
|
src.res_amount = res_amount
|
|
src.max_res_amount = max_res_amount
|
|
src.time = time
|
|
src.one_per_turf = one_per_turf
|
|
src.on_floor = on_floor
|
|
src.on_floor_or_lattice = on_floor_or_lattice
|
|
src.window_checks = window_checks
|
|
src.cult_structure = cult_structure
|
|
|
|
/datum/stack_recipe/proc/post_build(obj/item/stack/S, obj/result)
|
|
return
|
|
|
|
/* Special Recipes */
|
|
|
|
/datum/stack_recipe/cable_restraints
|
|
/datum/stack_recipe/cable_restraints/post_build(obj/item/stack/S, obj/result)
|
|
if(istype(result, /obj/item/restraints/handcuffs/cable))
|
|
result.color = S.color
|
|
..()
|
|
|
|
|
|
/datum/stack_recipe/dangerous
|
|
/datum/stack_recipe/dangerous/post_build(obj/item/stack/S, obj/result)
|
|
var/turf/targ = get_turf(usr)
|
|
message_admins("[title] made by [key_name_admin(usr)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in [get_area(usr)] [ADMIN_COORDJMP(targ)]!",0,1)
|
|
log_game("[title] made by [key_name_admin(usr)] at [get_area(usr)] [targ.x], [targ.y], [targ.z].")
|
|
..()
|
|
|
|
/datum/stack_recipe/rods
|
|
/datum/stack_recipe/rods/post_build(obj/item/stack/S, obj/result)
|
|
if(istype(result, /obj/item/stack/rods))
|
|
var/obj/item/stack/rods/R = result
|
|
R.update_icon()
|
|
..()
|
|
|
|
/datum/stack_recipe/window
|
|
/datum/stack_recipe/window/post_build(obj/item/stack/S, obj/result)
|
|
if(istype(result, /obj/structure/windoor_assembly))
|
|
var/obj/structure/windoor_assembly/W = result
|
|
W.ini_dir = W.dir
|
|
else if(istype(result, /obj/structure/window))
|
|
var/obj/structure/window/W = result
|
|
W.ini_dir = W.dir
|
|
W.anchored = FALSE
|
|
W.state = WINDOW_OUT_OF_FRAME
|
|
|
|
/*
|
|
* Recipe list datum
|
|
*/
|
|
/datum/stack_recipe_list
|
|
var/title = "ERROR"
|
|
var/list/recipes = null
|
|
|
|
/datum/stack_recipe_list/New(title, recipes)
|
|
src.title = title
|
|
src.recipes = recipes
|
|
|