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
Allows for sabre renaming. #20367
Merged
optimumtact
merged 5 commits into
tgstation:master
from
TechnoAlchemisto:cant_believe_shadowlight_banned_me
Sep 12, 2016
Merged
Allows for sabre renaming. #20367
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
476d170
Allows for sabre renaming.
TechnoAlchemisto 04bb24d
That's not supposed to be there
TechnoAlchemisto 9b537a4
Applies unique_rename to all /weapons
TechnoAlchemisto 09bd961
Merge branch 'cant_believe_shadowlight_banned_me' of https://github.c…
TechnoAlchemisto bf39a4a
fixes my stupid asshole
TechnoAlchemisto File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
/obj/item/weapon/melee | ||
needs_permit = 1 | ||
|
||
<<<<<<< HEAD | ||
======= | ||
var/unique_rename = 0 //allows renaming with a pen | ||
|
||
/obj/item/weapon/melee/examine(mob/user) | ||
..() | ||
if(unique_rename) | ||
user << "<span class='notice'>Use a pen on it to rename it.</span>" | ||
|
||
/obj/item/weapon/melee/attackby(obj/item/I, mob/user, params) | ||
if(unique_rename) | ||
if(istype(I, /obj/item/weapon/pen)) | ||
rename_weapon(user) | ||
..() | ||
|
||
/obj/item/weapon/melee/proc/rename_weapon(mob/M) | ||
var/input = stripped_input(M,"What do you want to name the weapon?", ,"", MAX_NAME_LEN) | ||
|
||
if(src && input && !M.stat && in_range(M,src) && !M.restrained() && M.canmove) | ||
name = input | ||
M << "You name the weapon [input]. Say hello to your new friend." | ||
return | ||
>>>>>>> 04bb24d27a666b5821c9c053014095c032095f9d | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
/obj/item/weapon/melee/chainofcommand | ||
name = "chain of command" | ||
desc = "A tool used by great men to placate the frothing masses." | ||
|
@@ -27,6 +51,7 @@ | |
icon_state = "sabre" | ||
item_state = "sabre" | ||
flags = CONDUCT | ||
unique_rename = 1 | ||
force = 15 | ||
throwforce = 10 | ||
w_class = 4 | ||
|
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
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.
Uh ohhh spaghettio