Skip to content
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 in a new chaplain antagonist item, the heartlight knife #10761

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions code/datums/syndicate_buylist.dm
Expand Up @@ -496,6 +496,16 @@ This is basically useless for anyone but miners.
vr_allowed = 0
can_buy = UPLINK_TRAITOR | UPLINK_SPY_THIEF

/datum/syndicate_buylist/traitor/scroll
name = "Scroll of Sacred Heart's"
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
item = /obj/item/device/sacred_heart_scroll
cost = 6
desc = "A scroll from ages past, sure to fill your heart with the lords truth."
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
job = list("Chaplain")
not_in_crates = 1
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
vr_allowed = 0
can_buy = UPLINK_TRAITOR | UPLINK_SPY

/datum/syndicate_buylist/traitor/contract
name = "Faustian Bargain Kit"
item = /obj/item/storage/briefcase/satan
Expand Down
61 changes: 61 additions & 0 deletions code/obj/item/device/sacred_heart.dm
@@ -0,0 +1,61 @@
#define HEART 1
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/device/sacred_heart_scroll
name = "Sacred Heart Scroll"
icon_state = "sacred_heart_scroll-"
desc = "A dusty old scroll containing essoteric knowlege from a time of cloak and dagger"
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
w_class = 2
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
is_syndicate = 1
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
var/implant = /obj/item/organ/heart/sacred
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
var/implants_available = HEART
var/list/parts_to_remove = list()
var/list/parts_to_add = list()

attack_self(mob/user as mob)
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
if (ishuman(user))
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
var/mob/living/carbon/human/H = user
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
src.add_fingerprint(H)
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
switch (alert("Would you like to read the [src] this can only be done once?",,"Proceed","Cancel"))
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
if ("Cancel")
return
if ("Proceed")
if (implants_available & HEART)
start_replace_heart(HEART, H)
else
user.show_text("This Scroll's Writings are Illegible.")
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved


proc/start_replace_heart(var/target, var/mob/living/carbon/human/H)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args don't need var/

Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
parts_to_add += "heart"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add the heart here?

for(var/part_loc in parts_to_add)
var/obj/item/bodypart = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compress lines 31 and 32

bodypart = H.get_organ(part_loc)
if(bodypart)
parts_to_remove += part_loc
boutput(H, "<span class='alert'>This will take some time to read!</span>")
SPAWN(1 SECOND)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't really need this at all

playsound(H.loc, "sound/items/ocular_implanter_start.ogg", 50, 0, -1)
SETUP_GENERIC_ACTIONBAR(H, src, 10 SECONDS, /obj/item/device/sacred_heart_scroll/proc/end_replace_heart, list(target, H), src.icon, src.icon_state,"[src] Teaches you much about the faith.", null)

proc/end_replace_heart(var/target, var/mob/living/carbon/human/H)
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target appears to be unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code doesn't work without it, it messes up line 31 (bodypart = H.get_organ(part_loc) somehow.
If you have a solution I'd be happy to implement it.

if(!H)
return
playsound(H.loc, "sound/items/ocular_implanter_end.ogg", 50, 0, -1)
var/turf/T = H.loc
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
for(var/part_loc in parts_to_remove)
if (T)
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
H.drop_organ(part_loc, T)
H.update_body()
for(var/part_loc in parts_to_add)
H.receive_organ(new implant, part_loc, 0, 1)
H.update_body()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call this outside of the for loop, update body isn't the cheapest proc

implants_available = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true/false defines

boutput(H, "<span class='alert'><b>[pick("IT HURTS!", "OH GOD!", "JESUS FUCK!")]</b></span>")
bleed(H, 5, 5)
SPAWN(5 DECI SECOND)
H.emote("scream")
icon_state = "sacred_heart_scroll-U"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit of having the scroll still exist? Evidence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya mainly for evidence, and partially flavor. It makes it so you can't just use it in the corner of maint and never have to deal with at least disposing of it.

parts_to_remove = list()
parts_to_add = list()

#undef HEART
22 changes: 22 additions & 0 deletions code/obj/item/misc_weapons.dm
Expand Up @@ -524,6 +524,28 @@
..()
setProperty("movespeed", -0.5)

//chaplain traitor knice
/obj/item/dagger/syndicate/chap_knife
name = "Blade of Light"
desc = "A knife conquered through unshakeable faith in the lord."
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
item_state = "chap_dagger"
force = 14
throwforce = 18
stamina_cost = 5
c_flags = EQUIPPED_WHILE_HELD

New()
..()
setProperty("movespeed", -0.4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this adjust move speed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a carry over from the syndicate infiltrator dagger, though nerfed comparatively. It helps give it utility and flavor, although if you believe it would be too powerful, it can be either nerfed or outright removed.

SPAWN(0)
icon_state = "chap_knife_1"
sleep(1 SECONDS)
icon_state = "chap_knife_2"
sleep(6 SECONDS)
icon_state = "chap_knife_3"
sleep(1 SECONDS)
qdel(src)

/obj/item/dagger/throwing_knife
name = "cheap throwing knife"
// icon = 'icons/obj/items/weapons.dmi'
Expand Down
14 changes: 14 additions & 0 deletions code/obj/item/organ_holder.dm
Expand Up @@ -1616,3 +1616,17 @@
src.icon_state = initial(src.icon_state)
else
src.icon_state = "[initial(src.icon_state)]_cd"

/datum/targetable/organAbility/sacredheart
name = "Sacred Heart"
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
desc = "Channel your faith in god into a knife to smite your enemies."
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
icon_state = "cyberkidney"
targeted = 0
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
cooldown = 30 SECONDS

cast(atom/target)
if (..())
return 1
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
boutput(holder.owner, "<span class='notice'>You use your [islist(linked_organ) ? "s" : ""] to conqure a knife from thin air.</span>")
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
var/obj/item/dagger/syndicate/chap_knife = new/obj/item/dagger/syndicate/chap_knife(get_turf(holder.owner))
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
holder.owner.put_in_hand_or_drop(chap_knife)
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions code/obj/item/organs/heart.dm
Expand Up @@ -115,6 +115,14 @@
else
return 0

/obj/item/organ/heart/sacred
name = "sacredheart"
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
desc = "A heart filled with the teachings of the bible"
Crackaduck marked this conversation as resolved.
Show resolved Hide resolved
item_state = "sacred_heart"
icon_state = "sacred_heart"
transplant_XP = 8
organ_abilities = list(/datum/targetable/organAbility/sacredheart)

/obj/item/organ/heart/synth
name = "synthheart"
desc = "I guess you could call this a... hearti-choke"
Expand Down
3 changes: 2 additions & 1 deletion goonstation.dme
Expand Up @@ -1414,6 +1414,7 @@ var/datum/preMapLoad/preMapLoad = new
#include "code\obj\item\misc_weapons.dm"
#include "code\obj\item\misc_wizard_stuff.dm"
#include "code\obj\item\mob_parts.dm"
#include "code\obj\item\mono_card_game.dm"
#include "code\obj\item\mops_cleaners.dm"
#include "code\obj\item\mousetrap.dm"
#include "code\obj\item\neon_lining.dm"
Expand All @@ -1426,7 +1427,6 @@ var/datum/preMapLoad/preMapLoad = new
#include "code\obj\item\plank.dm"
#include "code\obj\item\plants.dm"
#include "code\obj\item\playing_cards.dm"
#include "code\obj\item\mono_card_game.dm"
#include "code\obj\item\power_stones.dm"
#include "code\obj\item\range_target.dm"
#include "code\obj\item\rcd.dm"
Expand Down Expand Up @@ -1501,6 +1501,7 @@ var/datum/preMapLoad/preMapLoad = new
#include "code\obj\item\device\powersink.dm"
#include "code\obj\item\device\prox_sensor.dm"
#include "code\obj\item\device\radio.dm"
#include "code\obj\item\device\sacred_heart.dm"
#include "code\obj\item\device\scanners.dm"
#include "code\obj\item\device\shield.dm"
#include "code\obj\item\device\studio_monitor.dm"
Expand Down
Binary file modified icons/mob/inhand/hand_medical.dmi
Binary file not shown.
Binary file modified icons/mob/inhand/hand_weapons.dmi
Binary file not shown.
Binary file modified icons/mob/organ_abilities.dmi
Binary file not shown.
Binary file modified icons/obj/items/device.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons.dmi
Binary file not shown.
Binary file modified icons/obj/surgery.dmi
Binary file not shown.