-
Notifications
You must be signed in to change notification settings - Fork 199
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
Making Glock accept silencer and autolathe emaggable to build silencers #968
Open
Limeliz
wants to merge
6
commits into
NTStation:master
Choose a base branch
from
Limeliz:glock-silencer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5c88f56
Adding silencer to emagged autolathe
Limeliz d7cd540
Made the silencer fit on the Glock
Limeliz f9df973
Removed commented out code
Limeliz 07c72b9
Added silenced Glock
Limeliz 29e3c0c
SPAN CLASSES
Limeliz 26dcb62
Silencer summoned with Glock when Summon Weapons.
Limeliz 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,10 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
/* new /obj/item/weapon/shield/riot(), */ \ | ||
) | ||
|
||
var/global/list/autolathe_recipes_emagged = list( \ | ||
new /obj/item/weapon/silencer(), \ | ||
) | ||
|
||
/obj/machinery/autolathe | ||
name = "autolathe" | ||
desc = "It produces items using metal and glass." | ||
|
@@ -88,6 +92,7 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
anchored = 1.0 | ||
var/list/L = list() | ||
var/list/LL = list() | ||
var/list/LLL = list() | ||
var/hacked = 0 | ||
var/disabled = 0 | ||
var/shocked = 0 | ||
|
@@ -115,6 +120,7 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
wires = new(src) | ||
src.L = autolathe_recipes | ||
src.LL = autolathe_recipes_hidden | ||
src.LLL = autolathe_recipes_emagged | ||
|
||
/obj/machinery/autolathe/interact(mob/user) | ||
if(..()) | ||
|
@@ -151,6 +157,15 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
else | ||
attack_hand(user) | ||
return 1 | ||
|
||
else if(istype(O, /obj/item/weapon/card/emag) && !emagged) | ||
src.emagged = 1 | ||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread | ||
s.set_up(5, 1, src) | ||
s.start() | ||
user << "You short out the [src]'s circuit board, enabling debug mode." | ||
visible_message("\red BZZzZZzZZzZT") | ||
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. You should never use \red, \blue, or \any color. Instead use span class. |
||
return | ||
|
||
if (src.m_amount + O.m_amt > max_m_amount) | ||
user << "<span class=\"alert\">The autolathe is full. Please remove metal from the autolathe in order to insert more.</span>" | ||
|
@@ -214,7 +229,7 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
if(!attempting_to_build) | ||
return | ||
|
||
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o | ||
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL) || locate(attempting_to_build, src.LLL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o | ||
template = attempting_to_build | ||
|
||
else // somebody is trying to exploit, alert admins -walter0o | ||
|
@@ -293,6 +308,8 @@ var/global/list/autolathe_recipes_hidden = list( \ | |
objs += src.L | ||
if(src.hacked) | ||
objs += src.LL | ||
if(src.emagged) | ||
objs += src.LLL | ||
for(var/obj/t in objs) | ||
if(disabled || m_amount<t.m_amt || g_amount<t.g_amt) | ||
dat += replacetext("<span class='linkOff'>[t]</span>", "The ", "") | ||
|
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
Binary file not shown.
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.
Add a span class please. Preferably 'warning' but 'notice' works.