-
Notifications
You must be signed in to change notification settings - Fork 838
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
Adds armblade implant and support for item implants #6010
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
///Deployitem implant, holds a item that can then be placed inhand to do whatever with | ||
/obj/item/implant/deployitem | ||
name = "item implants" | ||
desc = "you shouldnt be seeing this" | ||
allowed_limbs = list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) | ||
///Held item we want to be put in hand when the implant is activated | ||
var/obj/item/helditem = /obj/item/healthanalyzer | ||
|
||
/obj/item/implant/deployitem/Initialize(mapload) | ||
. = ..() | ||
helditem = new helditem(src) | ||
|
||
/obj/item/implant/deployitem/activate() | ||
. = ..() | ||
if(!.) | ||
return | ||
if(malfunction == MALFUNCTION_PERMANENT) | ||
return FALSE | ||
if(helditem.loc != src) | ||
fetch_item() | ||
return | ||
put_in_slots() | ||
RegisterSignal(helditem, COMSIG_ITEM_DROPPED, .proc/fetch_item) | ||
|
||
///Takes the held item and puts it into it's predestined slot | ||
/obj/item/implant/deployitem/proc/put_in_slots() | ||
switch(part.name) | ||
if(BODY_ZONE_R_ARM) | ||
implant_owner.put_in_r_hand(helditem) | ||
if(BODY_ZONE_L_ARM) | ||
implant_owner.put_in_l_hand(helditem) | ||
|
||
///grabs the held item when it changes equip or is dropped | ||
/obj/item/implant/deployitem/proc/fetch_item() | ||
SIGNAL_HANDLER | ||
SHOULD_CALL_PARENT(TRUE) | ||
UnregisterSignal(helditem, COMSIG_ITEM_DROPPED) | ||
implant_owner.temporarilyRemoveItemFromInventory(helditem) | ||
helditem.forceMove(src) | ||
|
||
|
||
/obj/item/implant/deployitem/blade | ||
name = "mantis blade implant" | ||
desc = "A large folding blade capable of being stored within an arm." | ||
icon = 'icons/obj/items/weapons.dmi' | ||
icon_state = "armblade" | ||
helditem = /obj/item/weapon/mantisblade | ||
|
||
/obj/item/implant/deployitem/blade/get_data() | ||
return {" | ||
<b>Implant Specifications:</b><BR> | ||
<b>Name:</b> Nanotrasen MA-12 Mantis Implant<BR> | ||
<HR> | ||
<b>Implant Details:</b><BR> | ||
<b>Function:</b> Upon activation, the user deploys a large blade from the their arm.<BR>"} | ||
|
||
/obj/item/implant/deployitem/blade/put_in_slots() | ||
. = ..() | ||
playsound(implant_owner, 'sound/weapons/wristblades_on.ogg', 15, 0, 1) | ||
|
||
/obj/item/implant/deployitem/blade/fetch_item() | ||
. = ..() | ||
playsound(implant_owner, 'sound/weapons/wristblades_off.ogg', 15, 0, 1) | ||
|
||
/obj/item/weapon/mantisblade | ||
name = "mantis arm blade" | ||
desc = "A wicked-looking folding blade capable of being concealed within a human's arm." | ||
icon_state = "armblade" | ||
item_state = "armblade" | ||
force = 60 | ||
flags_atom = CONDUCT | ||
flags_equip_slot = NONE | ||
w_class = WEIGHT_CLASS_BULKY //not needed but just in case why not | ||
sharp = IS_SHARP_ITEM_BIG | ||
hitsound = 'sound/weapons/slash.ogg' | ||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") |
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.
Binary file not shown.
Binary file not shown.
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.
should probably be able to put in other slots as well