blowing_rod
Vars | |
glass_ref | A ref to the glass item being blown |
---|---|
in_use | Whether the rod is in use currently; will try to prevent many other actions on it |
Procs | |
check_finished | Checks if the glass is ready to craft into its chosen item. |
check_valid_table | Check if there is a non-flammable table nearby to do the crafting on. |
check_valid_tool | Check if user is carrying the proper tool for the step. |
create_item | Creates the finished product and delete the glass object used to make it. |
do_glass_step | Try to do a glassblowing action. |
fail_message | Display fail message and reset in_use. |
remove_glass | Removes the glass object from the rod. |
Var Details
glass_ref
A ref to the glass item being blown
in_use
Whether the rod is in use currently; will try to prevent many other actions on it
Proc Details
check_finished
Checks if the glass is ready to craft into its chosen item.
Craft is finished when all steps in steps_remaining are 0.
Arguments:
- obj/item/glassblowing/molten_glass/glass - the glass object
Returns TRUE or FALSE.
check_valid_table
Check if there is a non-flammable table nearby to do the crafting on.
If the user is a master in the production skill, they can skip tables.
Arguments:
- mob/living/user - the mob doing the action
Returns TRUE or FALSE.
check_valid_tool
Check if user is carrying the proper tool for the step.
Arguments:
- mob/living/carbon/human/user - the mob doing the action
- step_id - the step id of the action being done
We check to see if the user is using the right tool and if they are currently glassblowing with it.
If the correct tool is being used we return the tool. Otherwise we return FALSE
create_item
Creates the finished product and delete the glass object used to make it.
Try to put the finished product into the user's hands
Arguments:
- mob/user - the user doing the creating
- obj/item/glassblowing/molten_glass/glass - the glass object
Returns TRUE or FALSE.
do_glass_step
Try to do a glassblowing action.
Checks for a table and valid tool if applicable, and updates the steps_remaining on the glass object.
Arguments:
- step_id - the step id e.g. STEP_BLOW
- actioning_speed - the speed based on the user's production skill
- obj/item/glassblowing/molten_glass/glass - the glass object
fail_message
Display fail message and reset in_use.
Craft is finished when all steps in steps_remaining are 0.
Arguments:
- mob/user - mob to display to
- message - to display
remove_glass
Removes the glass object from the rod.
Try to put the glass into the user's hands, or on the floor if that fails.
Arguments:
- mob/user - the mob doing the removing
- obj/item/glassblowing/molten_glass/glass - the glass object
Returns TRUE or FALSE.