-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding metalwork. #3818
Merged
Merged
Adding metalwork. #3818
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/obj/item/chems/crucible | ||
name = "crucible" | ||
desc = "A heavy, thick-walled vessel used for melting down ore." | ||
icon = 'icons/obj/metalworking/crucible.dmi' | ||
icon_state = ICON_STATE_WORLD | ||
material = /decl/material/solid/stone/pottery | ||
atom_flags = ATOM_FLAG_OPEN_CONTAINER | ||
w_class = ITEM_SIZE_NO_CONTAINER | ||
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | ||
// TODO: storage datum when storage PR is merged. | ||
// max_w_class = ITEM_SIZE_LARGE | ||
// max_storage_space = BASE_STORAGE_CAPACITY(ITEM_SIZE_LARGE) | ||
var/max_held = 10 | ||
|
||
/obj/item/chems/crucible/attackby(obj/item/W, mob/user) | ||
|
||
if(istype(W, /obj/item/chems/mould)) | ||
if(W.material?.hardness <= MAT_VALUE_MALLEABLE) | ||
to_chat(user, SPAN_WARNING("\The [W] is currently too soft to be used as a mould.")) | ||
return TRUE | ||
if(standard_pour_into(user, W)) | ||
return TRUE | ||
|
||
if(istype(W, /obj/item/debris) || istype(W, /obj/item/stack/material)) | ||
|
||
if(length(contents) >= max_held) | ||
to_chat(user, SPAN_WARNING("\The [src] is full.")) | ||
return TRUE | ||
|
||
var/obj/item/transferring | ||
if(istype(W, /obj/item/stack)) | ||
var/obj/item/stack/input = W | ||
if(input.get_amount() <= 5 && user.try_unequip(input)) | ||
transferring = input | ||
else | ||
transferring = input.split(5) | ||
else if(user.try_unequip(W)) | ||
transferring = W | ||
|
||
if(transferring) | ||
transferring.forceMove(src) | ||
visible_message(SPAN_NOTICE("\The [user] drops \the [transferring] into \the [src].")) | ||
return TRUE | ||
|
||
return ..() | ||
|
||
/obj/item/chems/crucible/attack_hand(mob/user) | ||
if(length(contents)) | ||
var/obj/item/stack = pick(contents) | ||
stack.dropInto(get_turf(src)) | ||
user.put_in_hands(stack) | ||
return TRUE | ||
return ..() | ||
// End placeholder interaction. Remove when storage PR is in. | ||
|
||
/obj/item/chems/crucible/on_reagent_change() | ||
. = ..() | ||
queue_icon_update() | ||
|
||
/obj/item/chems/crucible/on_update_icon() | ||
. = ..() | ||
var/decl/material/primary_reagent = reagents?.get_primary_reagent_decl() | ||
if(primary_reagent) | ||
var/image/I = image(icon, "[icon_state]-filled") | ||
I.color = primary_reagent.color | ||
I.alpha = 255 * primary_reagent.opacity | ||
I.appearance_flags |= RESET_COLOR | ||
add_overlay(I) | ||
|
||
/obj/item/chems/crucible/initialize_reagents() | ||
create_reagents(15 * REAGENT_UNITS_PER_MATERIAL_SHEET) | ||
return ..() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could honestly just try calling
removing.try_burn_wearer(user)
? but maybe that'll happen anyways. honestly i kind of think holding a hot object is punishing enough for removing one from a lit kiln as it isThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's called anyway when the item is equipped.