-
Notifications
You must be signed in to change notification settings - Fork 496
Chameleon Bombs #12170
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
Open
Tractor-Maam
wants to merge
8
commits into
Monkestation:master
Choose a base branch
from
Tractor-Maam:chameleonbomb
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.
+195
−0
Open
Chameleon Bombs #12170
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b966666
welp, this seems about done
Tractor-Maam 8141928
wait shit i forgot the uplink
Tractor-Maam 688013e
dismemberment
Tractor-Maam aab1370
Update code/game/objects/items/grenades/chameleonbomb.dm
Tractor-Maam 5931219
Extra Detonation Method, Disguiseless lock
Tractor-Maam 304455f
additional arm methods
Tractor-Maam 1adca04
Improved examines
Tractor-Maam 0bbdc0b
Increased price
Tractor-Maam 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 hidden or 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,87 @@ | ||
| /obj/item/chameleonbomb | ||
| name = "chameleon bomb" | ||
| desc = "A devious device that can disguise itself as any object \ | ||
| and detonate a charge on the poor sod that tries to use it." | ||
| icon = 'icons/obj/weapons/grenade.dmi' | ||
| icon_state = "plastic-explosive0" | ||
| inhand_icon_state = "plastic-explosive" | ||
| lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi' | ||
| righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi' | ||
| w_class = WEIGHT_CLASS_TINY | ||
| ///explosion size as devast, heavy, light | ||
| var/explosive_size = list(0,0,3) | ||
| ///has at any point been disguised, to hide the examine | ||
| var/disguised = FALSE | ||
| ///locked from being redisguised | ||
| var/disguiselock = FALSE | ||
| var/blowingup | ||
|
|
||
| /obj/item/chameleonbomb/examine(mob/user) | ||
| . = ..() | ||
| if(!disguised) | ||
| . += span_notice("You can click an object to set a disguise.") | ||
| . += span_notice("Alt-clicking the bomb when disguised will lock the disguise from being changed.") | ||
| . += span_danger("Attempting to use the bomb inhand will explode it immediately!") | ||
|
|
||
| /obj/item/chameleonbomb/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) | ||
| . = ..() | ||
| if(!can_copy(interacting_with) || disguiselock || SHOULD_SKIP_INTERACTION(interacting_with, src, user)) | ||
| return NONE | ||
| make_copy(interacting_with, user) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| /obj/item/chameleonbomb/proc/can_copy(atom/target) | ||
| if(!icon_exists(target.icon, target.icon_state)) | ||
| return FALSE | ||
| if(!isitem(target)) | ||
| return FALSE | ||
| var/obj/item/itemtarget = target | ||
| if(itemtarget.w_class >= WEIGHT_CLASS_GIGANTIC) | ||
| return FALSE //too big to hold | ||
| if(target.alpha != 255) | ||
| return FALSE | ||
| if(target.invisibility != 0) | ||
| return FALSE | ||
| return TRUE | ||
|
|
||
| /obj/item/chameleonbomb/proc/make_copy(obj/item/target, mob/user) | ||
| disguised = TRUE | ||
| playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, TRUE, -6) | ||
| to_chat(user, span_notice("Scanned [target].")) | ||
| var/obj/item/temp = new /obj/item() | ||
| temp.appearance = target.appearance | ||
| temp.layer = initial(target.layer) // scanning things in your inventory | ||
| SET_PLANE_EXPLICIT(temp, src.plane, src) | ||
| appearance = temp.appearance | ||
| name = target.name | ||
| desc = target.desc | ||
| w_class = target.w_class | ||
| inhand_icon_state = target.inhand_icon_state | ||
| lefthand_file = target.lefthand_file | ||
| righthand_file = target.righthand_file | ||
| log_bomber(user, "set chameleon bomb disguise to", src, message_admins = FALSE) //dont message admins, its spammable and not actually blowing up yet | ||
|
|
||
| /obj/item/chameleonbomb/attack_self(mob/user, modifiers) | ||
|
Tractor-Maam marked this conversation as resolved.
|
||
| . = ..() | ||
| if(blowingup) | ||
| return | ||
| blowingup = TRUE | ||
| to_chat(user, span_userdanger("\The [src] loses it's decoy, it's a bomb!")) | ||
| visible_message(span_danger("The disguise on \the [src] [user] is holding falls! It's a bomb!"), span_userdanger("\The [src] loses it's disguise, it's a bomb!"), span_hear("A warbling sound rings out with a few beeps!")) | ||
| playsound(src, 'sound/machines/triple_beep.ogg', 50, FALSE) | ||
| log_bomber(user, "activated a chameleon bomb disguised as ", src) | ||
| explosion(src, explosive_size[1], explosive_size[2], explosive_size[3]) | ||
| if(iscarbon(user)) | ||
| var/mob/living/carbon/carbonuser = user | ||
| var/obj/item/bodypart/unluckyarm = carbonuser.get_holding_bodypart_of_item(src) | ||
| if(istype(unluckyarm)) //telekinesis bullshit? whatever! | ||
| unluckyarm?.dismember(silent = FALSE) | ||
| qdel(src) | ||
|
|
||
| /obj/item/chameleonbomb/click_alt(mob/user) | ||
| . = ..() | ||
| if(disguised && !disguiselock) | ||
| to_chat(user, span_danger("You activate the disguise lock on the bomb, it is now locked as \the [name].")) | ||
| log_bomber(user, "activated chameleonbomb disguise lock on", src) | ||
| disguiselock = TRUE | ||
| return CLICK_ACTION_SUCCESS | ||
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.