-
Notifications
You must be signed in to change notification settings - Fork 581
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
Makes the Light Replacer more easily attainable + Allows broken light recycling #7381
Conversation
Blundir suggested broken light recycling, so I've done that now. |
@@ -758,7 +758,7 @@ | |||
|
|||
/obj/item/light_bulb/proc/shatter() | |||
if(status == LIGHT_OK || status == LIGHT_BURNED) | |||
src.visible_message(SPAN_DANGER("[name] shatters."),SPAN_DANGER("You hear a small glass object shatter.")) | |||
src.visible_message(SPAN_DANGER("The [name] shatters."),SPAN_DANGER("You hear a small glass object shatter.")) |
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.
src.visible_message(SPAN_DANGER("The [name] shatters."),SPAN_DANGER("You hear a small glass object shatter.")) | |
visible_message(SPAN_DANGER("[src] shatters."), SPAN_DANGER("You hear a small glass object shatter.")) |
if(recycle == max_recycle) | ||
recycle = 0 | ||
AddUses(1) | ||
playsound(src.loc, 'sound/machines/ding.ogg', 5, 1) |
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.
playsound(src.loc, 'sound/machines/ding.ogg', 5, 1) | |
playsound(src, 'sound/machines/ding.ogg', 5, 1) |
playsound(src.loc, 'sound/machines/ding.ogg', 5, 1) | ||
return | ||
else | ||
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) |
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.
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) | |
playsound(src, 'sound/machines/click.ogg', 25, 1) |
AddUses(-1) | ||
return 1 | ||
|
||
// Negative numbers will subtract | ||
/obj/item/device/lightreplacer/proc/AddUses(amount = 1) | ||
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) |
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.
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) | |
playsound(src, 'sound/machines/click.ogg', 25, 1) |
user.drop_held_item() | ||
qdel(L) | ||
return | ||
else | ||
to_chat(user, "You need a working light.") | ||
Recycle() | ||
to_chat(user, SPAN_NOTICE("You insert the [L.name] into the [src.name] for recycling.")) |
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.
to_chat(user, SPAN_NOTICE("You insert the [L.name] into the [src.name] for recycling.")) | |
to_chat(user, SPAN_NOTICE("You insert [L] into [src] for recycling.")) |
@@ -83,31 +91,34 @@ | |||
if(L.status == 0) // LIGHT OKAY | |||
if(uses < max_uses) | |||
AddUses(1) | |||
to_chat(user, "You insert the [L.name] into the [src.name]. You have [uses] lights remaining.") | |||
to_chat(user, SPAN_NOTICE("You insert the [L.name] into the [src.name]. You have [uses] lights remaining.")) |
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.
to_chat(user, SPAN_NOTICE("You insert the [L.name] into the [src.name]. You have [uses] lights remaining.")) | |
to_chat(user, SPAN_NOTICE("You insert [L] into [src]. You have [uses] lights remaining.")) |
else | ||
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) | ||
recycle += 1 | ||
return |
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.
else | |
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) | |
recycle += 1 | |
return | |
playsound(src.loc, 'sound/machines/click.ogg', 25, 1) | |
recycle += 1 |
the else clause is redundant as the previous condition returns
pr appears to be stale with unaddressed requested changes, feel free to address the changes and ask us to reopen. or just make a new pr |
About the pull request
Adds the Light Replacer to both ComTech and normal tool storage vendors, and adds it to the autolathe recipe list. Allows the Light Replacer to recycle broken lights either when replacing bulbs or inserting a broken one by hand, converting 5 broken ones to 1 usable light.
Also cleaned up a grammar mistake when shattering a lightbulb.
Explain why it's good for the game
The Light Replacer is a niche but handy tool for lighting places a bit more effectively than flares or flashlights can (provided the local APC is still functioning or that there even is one) but has very limited avaliability. Though not a major issue, it'd be nicer to have a way of replacing/aquiring one than having to steal one of the limited few from Upper Engineering, hunting for one groundside, or bugging your local engineers for theirs if they aren't using it (most of whom probably ditched it in their prep area anyway). Plus, it'd make sense that tool vendors would have them in stock and that the autolathe can print replacements.
The minor rework improves functionality and makes using it a smoother process.
Bad grammar is bad.
Testing Photographs and Procedure
Added it to autolathe recipes and vendors. Found out it didn't have material costs, so added matter values.
Changelog
🆑 Killfish
add: Added the Light Replacer to tool storage and to the autolathe. The Light Replacer can now also recycle broken bulbs, either directly when replacing or when inserted by hand.
spellcheck: Fixes missing 'the' when shattering a light bulb, so it no longer says 'light tube smashes' in all lower case.
/:cl: