-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
Gun attachments #2917
Merged
Merged
Gun attachments #2917
Changes from 224 commits
Commits
Show all changes
246 commits
Select commit
Hold shift + click to select a range
cd42997
clean this shit up
ZephyrTFA 003dd66
attachment boilerplate
ZephyrTFA e6171aa
tick attachment stuff and alphabatize
ZephyrTFA dce2de0
get rid of snowflake attachments
ZephyrTFA 0e6fcb6
Merge branch 'shiptest-ss13:master' into gunattach
ZephyrTFA ab61772
attachment radial
ZephyrTFA 12cd826
fix a 'static ref warning'
ZephyrTFA 73bea52
change overlay passing to generate on the fly
ZephyrTFA cc18b88
update invoke args
ZephyrTFA 7c5f098
begone
ZephyrTFA b30f3bd
attachment helper subtype and tick
ZephyrTFA 86de93a
laser sight :)
ZephyrTFA 44da3ff
wordage? idk
ZephyrTFA 5ddef6d
just gonna sneak this one in here
ZephyrTFA 3c7f5cb
if they didnt pass offsets dont runtime trying to use them
ZephyrTFA 3fff14f
uncomment this
ZephyrTFA 78ac1cc
ugly ass fucking sprites
ZephyrTFA 8aae9ff
update icon on detach too
ZephyrTFA 41ec513
haha yea boy
ZephyrTFA b59758f
better flag handling
ZephyrTFA e765c5e
attack animation if any attachment handles it
ZephyrTFA 1dd9149
stabby stabby :)
ZephyrTFA 3f11acf
tick
ZephyrTFA db3a7ac
fix proc path
ZephyrTFA 1feef8d
preattack callback
ZephyrTFA a890431
bayonets make a sound when you toggle them
ZephyrTFA 3fe8540
what if we just call the melee chain directly
ZephyrTFA 298249c
actually fix reach
ZephyrTFA 0c7b1ae
Merge remote-tracking branch 'upstream/master' into gunattach
ZephyrTFA a0c6510
Merge remote-tracking branch 'upstream/master' into gunattach
ZephyrTFA caa6f5b
better sprites
ZephyrTFA d0bffcc
fix this
ZephyrTFA 2944785
extendo and correct icon state
ZephyrTFA 5f115bc
correct lasersight proc parameters and icon state
ZephyrTFA 8887405
fix rail light params and icon state
ZephyrTFA b87fd94
remove deprecated vars
ZephyrTFA 764826e
remove old flight vars
ZephyrTFA 2fc75cd
this will default to zero for the time being
ZephyrTFA bab49d4
slots are handled as bflags
ZephyrTFA 14253fe
update icon on any attachment change always
ZephyrTFA 938e213
correcet attach icon states
ZephyrTFA f37814f
silencer into attachment
ZephyrTFA 563019b
haha AHHA AHHAHAHA
ZephyrTFA 1a19ae1
craft plasma bayonet
ZephyrTFA 3656aeb
update icon state again
ZephyrTFA d8f698f
haha dont forget this yes
ZephyrTFA cd46a0b
Merge branch 'master' into gunattach
ZephyrTFA 46e4dce
a thing
FalloutFalcon 55d0b19
kinda workin
FalloutFalcon 809d204
this uhh is not working. gonna rework this all
FalloutFalcon c4906ac
Improves deconstruction functionality to lathe
FalloutFalcon b1c734e
new options? half working
FalloutFalcon 3bbba1f
might try to port some eris stuff (foolish)
FalloutFalcon 39679d8
gun parts
FalloutFalcon d3155d0
"works" dont like how this is handled
FalloutFalcon 5bbc36a
we getting there
FalloutFalcon db2edc3
grip dont control gun and seperate files
FalloutFalcon de7c2b5
shrug
FalloutFalcon 22de36f
scrap blueprint system
FalloutFalcon 8f28e6b
frames on gun init
FalloutFalcon 976ae14
dynamicly generate the parts
FalloutFalcon 04982c4
yea
FalloutFalcon 08df15f
yea
FalloutFalcon 8cc5bfe
aaa
FalloutFalcon 5304d07
wow it just works!!
FalloutFalcon 182551f
bitflags soon
FalloutFalcon ad28497
ye
FalloutFalcon 8a870e0
yea
FalloutFalcon a5dc317
commit to recipes
FalloutFalcon 98b5d80
yea
FalloutFalcon 8c1b7c5
Refactor gun crafting module and add new tools
FalloutFalcon 2959730
poorly optimized holy dang
FalloutFalcon 93f1813
yea
FalloutFalcon 2bf0717
evil tbh
FalloutFalcon f08b4bb
ye
FalloutFalcon 4420698
kinda working i think?
FalloutFalcon f4c2581
unit test?
FalloutFalcon 3a2863c
yea
FalloutFalcon d4762b3
hard to tell if parts are reinstalled without any
FalloutFalcon f80aad3
what if wrong?
FalloutFalcon 026d860
TEST
FalloutFalcon 7503789
bleh
FalloutFalcon b05cf87
no bitflags
FalloutFalcon 2aec984
shrug
FalloutFalcon 52e6d39
Merge branch 'guncrafting' of https://github.com/FalloutFalcon/Shipte…
FalloutFalcon 281debc
yea
FalloutFalcon 0eee121
yea
FalloutFalcon c52fb7f
wooo so much stuff..
FalloutFalcon 3c9125d
much clearer
FalloutFalcon e814742
oops all camelCase
FalloutFalcon 422ddb1
see how this goes
FalloutFalcon 67db4f3
Merge branch 'master' into guncrafting
FalloutFalcon 0ffb50f
ballistic
FalloutFalcon e54f627
cruft guns
FalloutFalcon 30277b3
kills pins
FalloutFalcon 48deb25
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 8e1c8d2
Merge branch 'master' into guncrafting
FalloutFalcon 4756438
hm
FalloutFalcon a049ff9
oh the paths changed alot?
FalloutFalcon 54ec418
yea
FalloutFalcon f6af122
candor
FalloutFalcon f39fe7e
firing pins are the devil i think
FalloutFalcon b81b109
Merge branch 'master' into kills-magic
FalloutFalcon bc765fa
ok no errors?
FalloutFalcon 6c3113d
some more
FalloutFalcon 5981540
than k you thingrvr :thumbsup:
FalloutFalcon 7547ca6
proper foam darts where needed
FalloutFalcon 830f01c
Merge remote-tracking branch 'upstream/master' into kills-magic
FalloutFalcon ed83234
Merge remote-tracking branch 'upstream/master' into guncrafting
FalloutFalcon a4604f4
ya
FalloutFalcon 08c5872
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon e735f97
i dunno
FalloutFalcon f345d44
yea
FalloutFalcon 8506478
culling to pistols and revvys and reduces gun part quanity from crate
FalloutFalcon 9e22fae
augh
FalloutFalcon 44e83b3
Merge remote-tracking branch 'Shiptest/master' into guncrafting
FalloutFalcon a466463
Merge remote-tracking branch 'Shiptest/master' into kills-magic
FalloutFalcon 91e07f2
unit unit
FalloutFalcon 4dd50c8
Merge remote-tracking branch 'Shiptest/master' into guncrafting
FalloutFalcon 1fe0695
soft port of CEV-eris tool system
FalloutFalcon 1cba2a0
stuff
FalloutFalcon d0f6552
yea
FalloutFalcon ecfdd90
pass mabye
FalloutFalcon ad53bb3
Merge branch 'master' into kills-magic
FalloutFalcon 570b279
Merge branch 'guncrafting' into gun-qol
FalloutFalcon e7a6c2b
wow surpised it already builds
FalloutFalcon 6564855
regenerate and Atomproc call admin tools make these pointless
FalloutFalcon 32ad922
how did i readd this
FalloutFalcon d5046c5
more lol
FalloutFalcon 1d48d3e
yea
FalloutFalcon c696e68
removes more magic
FalloutFalcon c306c51
Merge remote-tracking branch 'Upstream/master' into kills-magic
FalloutFalcon f220ab1
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 5e86a57
fix
FalloutFalcon c346395
unrestricted no longer exists
FalloutFalcon 68e23f2
gun defines more orginized
FalloutFalcon 6b3e430
Merge remote-tracking branch 'Shiptest/master' into gunattach2
FalloutFalcon fdd4e40
a bit to fix for sure
FalloutFalcon 30327b7
removes removed vars
FalloutFalcon 902663d
insane
FalloutFalcon 039813a
Merge remote-tracking branch 'Shiptest/master' into gun-qol
FalloutFalcon 13999e2
e
FalloutFalcon 1cbe9e6
Merge branch 'gun-qol' into gunattach2
FalloutFalcon 1819710
Merge branch 'master' into kills-magic
FalloutFalcon 4d6244f
Update beach_ancient_ruin.dmm
FalloutFalcon de2336d
nvm im dum
FalloutFalcon 1eb41c3
Delete _maps/shuttles/syndicate/syndicate_luxembourg.dmm
FalloutFalcon cc24059
yea
FalloutFalcon 36397d5
Merge branch 'kills-magic' into gun-qol
FalloutFalcon a4059d5
Merge branch 'master' into gun-qol
FalloutFalcon 97df7be
Merge branch 'gun-qol' into gunattach2
FalloutFalcon 9b8f6f9
PROC_REF stuff
FalloutFalcon e31f446
orgnzies vars
FalloutFalcon 4a857b2
dumps subtype of gun vars into gun so i can combine like half of them…
FalloutFalcon 9bac270
ALMOST every powered var was a energy var
FalloutFalcon fecc734
formating and combining small_gun and big_gun into mag_size
FalloutFalcon 848ee9b
adds bool for toggling and wish for death looking at powered
FalloutFalcon c4b0492
right
FalloutFalcon d009f2d
stuff
FalloutFalcon 552204d
hoepfully it gets garbo colllected now?
FalloutFalcon fa0b972
kill him
FalloutFalcon 6fbd0f1
yea
FalloutFalcon e895ad1
yea
FalloutFalcon d589f5c
can suprres junk
FalloutFalcon 151a4c8
attachment orginize
FalloutFalcon f67ca1d
stuff
FalloutFalcon 99771ce
yea
FalloutFalcon 02b4056
pixel offsets for attachments, very bad scope, normal bayonet
FalloutFalcon f73ac76
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 2e7c8f7
cant belive those all were like that, copy paste smh
FalloutFalcon b6c472b
duplicate declerations
FalloutFalcon 5936ef8
I dont think we need to do it like this
FalloutFalcon 34a8abd
examine stuff
FalloutFalcon 7e626c1
better examine
FalloutFalcon fb47493
ok im lazy im going back to how they had it instead of figuring it out
FalloutFalcon 4a11781
cleaning up radial and overlay shiifting
FalloutFalcon db3c264
crates!
FalloutFalcon 76cf650
gonna get bitfield proper working
FalloutFalcon 2e364bb
bit
FalloutFalcon c55f50d
actions and bipod
FalloutFalcon b12c615
buttons
FalloutFalcon da2af2a
ough idk actions are being slighlty annoying
FalloutFalcon 5ddd1a0
making progress just need to get the icon updated
FalloutFalcon 42f1ac1
attachment flags
FalloutFalcon 62f651c
sound and var orginization
FalloutFalcon 3a448a9
these do the same thing
FalloutFalcon d1e6134
true false
FalloutFalcon 0b3d1cd
dumps some attachments to a do later folder
FalloutFalcon c8eb226
bitflag yo
FalloutFalcon 8377242
Merge branch 'master' into gunattach2
FalloutFalcon 747c17f
bayonet examine and FALSE
FalloutFalcon 659febc
stuff
FalloutFalcon 93671b8
Merge branch 'master' into gunattach2
FalloutFalcon 1669b24
attach vars for ballistic and energy
FalloutFalcon 03db99d
Merge branch 'master' into gunattach2
FalloutFalcon 584767e
?
FalloutFalcon 6dc6826
this?
FalloutFalcon 9181588
wrong
FalloutFalcon 9e09fac
stop tests failing i think
FalloutFalcon 499d5a4
Merge branch 'master' into gunattach2
FalloutFalcon 95c24cd
Merge branch 'master' into gunattach2
FalloutFalcon 2ca3238
better fix for the create and destroy fail
FalloutFalcon c9a6ee7
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 5f7b945
ytea
FalloutFalcon 992549e
dont rename that
FalloutFalcon 0d24ffd
conflict merges where kinda a bitch
FalloutFalcon 95de680
yea
FalloutFalcon 586540b
removes replaced var
FalloutFalcon a527125
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 08fa2f6
changes to attachment removal, moves it to alt click
FalloutFalcon 1ac8243
small improvments to attachment code, default attachs work, better gu…
FalloutFalcon 7cf26b5
improvments to attachment holder examine more
FalloutFalcon dd097fe
stocks working!
FalloutFalcon 4879517
linters
FalloutFalcon e183e56
Merge branch 'master' into gunattach2
FalloutFalcon 53c23de
oops i need that
FalloutFalcon b86528f
oops merge broke a var name
FalloutFalcon fe272e4
testing why this fails
FalloutFalcon 96e1285
issue with button cleanup..
FalloutFalcon 28bb45c
ough gun
FalloutFalcon 41a3c7f
Merge branch 'master' into gunattach2
FalloutFalcon 64aba3e
Merge branch 'master' into gunattach2
SomeguyManperson 5a25cb1
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon cf1bcff
removes some comments
FalloutFalcon ea16feb
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 9bbf028
merge conflict fail
FalloutFalcon bce4c12
removes wip file
FalloutFalcon e290b96
Update code/modules/projectiles/gun.dm
FalloutFalcon 6cc3196
Update code/modules/cargo/packs/gun.dm
FalloutFalcon ab923f3
Update code/modules/cargo/packs/gun.dm
FalloutFalcon af0aff1
Update code/game/objects/items/attachments/laser_sight.dm
FalloutFalcon d7293cb
Update code/game/objects/items/attachments/rail_light.dm
FalloutFalcon 51d3bbf
Update code/game/objects/items/attachments/silencer.dm
FalloutFalcon 459d814
Update code/game/objects/items/attachments/silencer.dm
FalloutFalcon b3db307
Update code/game/objects/items/attachments/stock.dm
FalloutFalcon dfd9150
Update code/game/objects/items/attachments/stock.dm
FalloutFalcon 657438d
Update code/modules/cargo/packs/gun.dm
FalloutFalcon 227aadb
Update code/modules/cargo/packs/gun.dm
FalloutFalcon b591114
Update code/modules/cargo/packs/gun.dm
FalloutFalcon c17adc9
Addresing some of the review
FalloutFalcon 33c64d8
Autodoc
FalloutFalcon 8e1005a
comments
FalloutFalcon 47d3000
forgot to make these 3 not 2
FalloutFalcon 53b69d1
defines for few gun things
FalloutFalcon b36f606
Merge branch 'master' of https://github.com/shiptest-ss13/Shiptest in…
FalloutFalcon 1d4621a
fixes e weapons being broken
FalloutFalcon 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
/datum/component/attachment | ||
var/slot | ||
var/attach_features_flags | ||
var/list/valid_parent_types | ||
var/datum/callback/on_attach | ||
var/datum/callback/on_detach | ||
var/datum/callback/on_toggle | ||
var/datum/callback/on_preattack | ||
var/list/datum/action/actions | ||
var/datum/action/attachment/attachment_toggle_action | ||
|
||
/datum/component/attachment/Initialize( | ||
slot = ATTACHMENT_SLOT_RAIL, | ||
attach_features_flags = ATTACH_REMOVABLE_HAND, | ||
valid_parent_types = list(/obj/item/gun), | ||
datum/callback/on_attach = null, | ||
datum/callback/on_detach = null, | ||
datum/callback/on_toggle = null, | ||
datum/callback/on_preattack = null, | ||
list/signals = null | ||
) | ||
|
||
if(!isitem(parent)) | ||
return COMPONENT_INCOMPATIBLE | ||
|
||
src.slot = slot | ||
src.attach_features_flags = attach_features_flags | ||
src.valid_parent_types = valid_parent_types | ||
src.on_attach = on_attach | ||
src.on_detach = on_detach | ||
src.on_toggle = on_toggle | ||
src.on_preattack = on_preattack | ||
|
||
ADD_TRAIT(parent, TRAIT_ATTACHABLE, "attachable") | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_ATTACH, PROC_REF(try_attach)) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_DETACH, PROC_REF(try_detach)) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_EXAMINE, PROC_REF(handle_examine)) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_EXAMINE_MORE, PROC_REF(handle_examine_more)) | ||
if(attach_features_flags & ATTACH_TOGGLE) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_TOGGLE, PROC_REF(try_toggle)) | ||
attachment_toggle_action = new /datum/action/attachment(parent) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_PRE_ATTACK, PROC_REF(relay_pre_attack)) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_UPDATE_OVERLAY, PROC_REF(update_overlays)) | ||
RegisterSignal(parent, COMSIG_ATTACHMENT_GET_SLOT, PROC_REF(send_slot)) | ||
|
||
for(var/signal in signals) | ||
RegisterSignal(parent, signal, signals[signal]) | ||
|
||
/datum/component/attachment/Destroy(force, silent) | ||
REMOVE_TRAIT(parent, TRAIT_ATTACHABLE, "attachable") | ||
if(actions && length(actions)) | ||
var/obj/item/gun/parent = src.parent | ||
parent.actions -= actions | ||
QDEL_LIST(actions) | ||
qdel(attachment_toggle_action) | ||
return ..() | ||
|
||
/datum/component/attachment/proc/try_toggle(obj/item/parent, obj/item/holder, mob/user) | ||
SIGNAL_HANDLER | ||
if(attach_features_flags & ATTACH_TOGGLE) | ||
INVOKE_ASYNC(src, PROC_REF(do_toggle), parent, holder, user) | ||
holder.update_icon() | ||
attachment_toggle_action.UpdateButtonIcon() | ||
|
||
|
||
FalloutFalcon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/datum/component/attachment/proc/do_toggle(obj/item/parent, obj/item/holder, mob/user) | ||
if(on_toggle) | ||
on_toggle.Invoke(holder, user) | ||
return TRUE | ||
|
||
parent.attack_self(user) | ||
return TRUE | ||
|
||
/datum/component/attachment/proc/update_overlays(obj/item/parent, list/overlays, list/offset) | ||
if(!(attach_features_flags & ATTACH_NO_SPRITE)) | ||
overlays += mutable_appearance(parent.icon, "[parent.icon_state]-attached") | ||
|
||
/datum/component/attachment/proc/try_attach(obj/item/parent, obj/item/holder, mob/user, bypass_checks) | ||
SIGNAL_HANDLER | ||
|
||
if(!bypass_checks) | ||
if(!parent.Adjacent(user) || (length(valid_parent_types) && (holder.type in valid_parent_types))) | ||
return FALSE | ||
|
||
if(on_attach && !on_attach.Invoke(holder, user)) | ||
return FALSE | ||
|
||
parent.forceMove(holder) | ||
|
||
if(attach_features_flags & ATTACH_TOGGLE) | ||
holder.actions += list(attachment_toggle_action) | ||
attachment_toggle_action.gun = holder | ||
attachment_toggle_action.Grant(user) | ||
|
||
return TRUE | ||
|
||
/datum/component/attachment/proc/try_detach(obj/item/parent, obj/item/holder, mob/user) | ||
SIGNAL_HANDLER | ||
|
||
if(!parent.Adjacent(user) || (valid_parent_types && (holder.type in valid_parent_types))) | ||
return FALSE | ||
|
||
if(on_attach && !on_detach.Invoke(holder, user)) | ||
return FALSE | ||
|
||
if(attach_features_flags & ATTACH_TOGGLE) | ||
holder.actions -= list(attachment_toggle_action) | ||
attachment_toggle_action.gun = null | ||
attachment_toggle_action.Remove(user) | ||
|
||
if(user.can_put_in_hand(parent)) | ||
user.put_in_hand(parent) | ||
return TRUE | ||
|
||
parent.forceMove(holder.drop_location()) | ||
return TRUE | ||
|
||
/datum/component/attachment/proc/handle_examine(obj/item/parent, mob/user, list/examine_list) | ||
SIGNAL_HANDLER | ||
|
||
/datum/component/attachment/proc/handle_examine_more(obj/item/parent, mob/user, list/examine_list) | ||
SIGNAL_HANDLER | ||
|
||
/datum/component/attachment/proc/relay_pre_attack(obj/item/parent, obj/item/gun, atom/target_atom, mob/user, params) | ||
SIGNAL_HANDLER_DOES_SLEEP | ||
|
||
if(on_preattack) | ||
return on_preattack.Invoke(gun, target_atom, user, params) | ||
|
||
/datum/component/attachment/proc/send_slot(obj/item/parent) | ||
SIGNAL_HANDLER | ||
return attachment_slot_to_bflag(slot) | ||
|
||
/datum/action/attachment | ||
name = "Toggle Attachment" | ||
check_flags = AB_CHECK_HANDS_BLOCKED|AB_CHECK_CONSCIOUS | ||
button_icon_state = null | ||
var/obj/item/gun/gun = null | ||
FalloutFalcon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/datum/action/attachment/New(Target) | ||
..() | ||
name = "Toggle [target.name]" | ||
button.name = name | ||
icon_icon = target.icon | ||
button_icon_state = target.icon_state | ||
|
||
/datum/action/attachment/Destroy() | ||
. = ..() | ||
gun = null | ||
|
||
/datum/action/attachment/Trigger() | ||
..() | ||
SEND_SIGNAL(target, COMSIG_ATTACHMENT_TOGGLE, gun, owner) | ||
|
||
/datum/action/attachment/UpdateButtonIcon() | ||
icon_icon = target.icon | ||
button_icon_state = target.icon_state | ||
..() | ||
|
||
/datum/action/attachment/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force) | ||
if(button_icon && button_icon_state) | ||
// If set, use the custom icon that we set instead | ||
// of the item appearence | ||
..() | ||
else if((target && current_button.appearance_cache != target.appearance) || force) //replace with /ref comparison if this is not valid. | ||
var/obj/item/I = target | ||
var/old_layer = I.layer | ||
var/old_plane = I.plane | ||
I.layer = FLOAT_LAYER //AAAH | ||
I.plane = FLOAT_PLANE //^ what that guy said | ||
current_button.cut_overlays() | ||
current_button.add_overlay(I) | ||
I.layer = old_layer | ||
I.plane = old_plane | ||
current_button.appearance_cache = I.appearance |
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.
Autodoc all of this please