Skip to content

Commit

Permalink
Merge pull request Blackstone-SS13#171 from Contrabang/the-damned-cry
Browse files Browse the repository at this point in the history
The damned cry for release from their hells (Spirit update)
  • Loading branch information
Contrabang authored Apr 17, 2024
2 parents d4bbad0 + e67eb65 commit 6562703
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 17 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_XENO_IMMUNE "xeno_immune"//prevents xeno huggies implanting skeletons
#define TRAIT_NOPAIN "no_pain"
#define TRAIT_DRUQK "druqk"
#define TRAIT_BURIED_COIN_GIVEN "buried_coin_given" // prevents a human corpse from being used for a corpse multiple times

//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
Expand Down
8 changes: 4 additions & 4 deletions code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
return FALSE
return TRUE

/atom/proc/OnCrafted(dirin)
/atom/proc/OnCrafted(dirin, user)
return

/obj/item/OnCrafted(dirin)
Expand Down Expand Up @@ -261,16 +261,16 @@
for(var/IT in L)
var/atom/movable/I = new IT(T)
I.CheckParts(parts, R)
I.OnCrafted(user.dir)
I.OnCrafted(user.dir, user)
else
if(ispath(R.result, /turf))
var/turf/X = T.PlaceOnTop(R.result)
if(X)
X.OnCrafted(user.dir)
X.OnCrafted(user.dir, user)
else
var/atom/movable/I = new R.result (T)
I.CheckParts(parts, R)
I.OnCrafted(user.dir)
I.OnCrafted(user.dir, user)
user.visible_message("<span class='notice'>[user] [R.verbage] \a [R.name]!</span>", \
"<span class='notice'>I [R.verbage] \a [R.name]!</span>")
if(user.mind && R.skillcraft)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/rogueitems/coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@
desc = initial(desc)
icon_state = "[base_type][heads_tails]"
dropshrink = 0.2
slot_flags = ITEM_SLOT_MOUTH
return

name = plural_name
desc = ""
dropshrink = 1
slot_flags = null
switch(quantity)
if(2)
dropshrink = 0.2 // this is just like the single coin, gotta shrink it
Expand Down
15 changes: 15 additions & 0 deletions code/modules/mob/living/carbon/spirit/spirit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
bodyparts = list(/obj/item/bodypart/chest/spirit, /obj/item/bodypart/head/spirit, /obj/item/bodypart/l_arm/spirit,
/obj/item/bodypart/r_arm/spirit, /obj/item/bodypart/r_leg/spirit, /obj/item/bodypart/l_leg/spirit)
hud_type = /datum/hud/spirit
density = FALSE // ghosts can pass through other mobs
var/paid = FALSE
var/beingmoved = FALSE
var/livingname = null
Expand Down Expand Up @@ -54,6 +55,20 @@
var/L = new /obj/item/flashlight/lantern/shrunken(src.loc)
put_in_hands(L)
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_BAREFOOT, 1, 2)
addtimer(CALLBACK(src, PROC_REF(give_patron_toll)), 15 MINUTES)

/mob/living/carbon/spirit/proc/give_patron_toll()
if(QDELETED(src) || paid)
return
for(var/item in held_items)
if(istype(item, /obj/item/underworld/coin))
return
put_in_hands(new /obj/item/underworld/coin/notracking(get_turf(src)))
if(PATRON)
to_chat(src, "<span class='danger'>Your suffering has not gone unnoticed, [PATRON] has rewarded you with your toll.</span>")
else
to_chat(src, "<span class='danger'>Your suffering has not gone unnoticed, your patron has rewarded you with your toll.</span>")
playsound(src, 'sound/combat/caught.ogg', 80, TRUE, -1)

/mob/living/carbon/spirit/create_internal_organs()
internal_organs += new /obj/item/organ/lungs
Expand Down
35 changes: 26 additions & 9 deletions code/modules/roguetown/roguejobs/gravedigger/gravemarker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,46 @@
to_chat(src, "<span class='rose'>My soul finds peace buried in creation.</span>")


/obj/structure/gravemarker/OnCrafted(dir)
/obj/structure/gravemarker/OnCrafted(dir, user)
icon_state = "gravemarker[rand(1,3)]"
for(var/obj/structure/closet/dirthole/D in loc)
bodysearch(D)
bodysearch(D, user)
for(var/obj/structure/closet/burial_shroud/B in D)
bodysearch(B)
bodysearch(B, user)
..()

/obj/structure/gravemarker/proc/bodysearch(atom/movable/AM)
/obj/structure/gravemarker/proc/bodysearch(atom/movable/AM, mob/user)
if(!AM)
return
for(var/mob/living/L in AM)
if(L.stat == DEAD)
if(ishuman(L) && !HAS_TRAIT(L, TRAIT_BURIED_COIN_GIVEN))
var/mob/living/carbon/human/H = L
if(istype(H.mouth, /obj/item/roguecoin))
var/obj/item/roguecoin/coin = H.mouth
if(coin.quantity == 1) // no fucking stuffing their mouth full of a fuck ton of coins
for(var/obj/effect/landmark/underworld/A in GLOB.landmarks_list)
var/turf/T = get_turf(A)
T = locate(T.x + rand(-3, 3), T.y + rand(-3, 3), T.z)
new /obj/item/underworld/coin/notracking(T)
T.visible_message("<span class='warning'>A coin falls from above.</span>")
ADD_TRAIT(H, TRAIT_BURIED_COIN_GIVEN, TRAIT_GENERIC)
if(user?.ckey)
adjust_playerquality(0.1, user.ckey)
qdel(H.mouth)
H.update_inv_mouth()
break
if(L.mind && L.mind.has_antag_datum(/datum/antagonist/zombie))
L.mind.remove_antag_datum(/datum/antagonist/zombie)
var/mob/dead/observer/O
//We probably went to the underworld
if(!L.client)
var/client/friendo = GLOB.directory[lowertext(L.mind.key)]
if(friendo && istype(friendo.mob, /mob/living/carbon/spirit))
var/mob/living/carbon/spirit/lost_soul = friendo.mob
lost_soul = L.ghostize(force_respawn = TRUE)
qdel(lost_soul)
if(L.mind)
var/client/friendo = GLOB.directory[lowertext(L.mind.key)]
if(friendo && istype(friendo.mob, /mob/living/carbon/spirit))
var/mob/living/carbon/spirit/lost_soul = friendo.mob
lost_soul = L.ghostize(force_respawn = TRUE)
qdel(lost_soul)
else
O = L.ghostize(force_respawn = TRUE)
if(O)
Expand Down
16 changes: 12 additions & 4 deletions code/modules/underworld/underworld.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,35 @@ GLOBAL_LIST_EMPTY(underworld_coins)
desc = "This is more than just a coin."
icon = 'icons/roguetown/underworld/enigma_husks.dmi'
icon_state = "soultoken_floor"
var/should_track = TRUE

/obj/item/underworld/coin/Initialize()
. = ..()
GLOB.underworld_coins |= src
if(should_track)
GLOB.underworld_coins |= src

/obj/item/underworld/coin/Destroy()
GLOB.underworld_coins -= src
if(should_track)
GLOB.underworld_coins -= src
coin_upkeep()
return ..()

/obj/item/underworld/coin/pickup(mob/user)
..()
GLOB.underworld_coins -= src
if(should_track)
GLOB.underworld_coins -= src
coin_upkeep()
icon_state = "soultoken"

/obj/item/underworld/coin/dropped(mob/user)
..()
GLOB.underworld_coins |= src
if(should_track)
GLOB.underworld_coins |= src
icon_state = "soultoken_floor"

/obj/item/underworld/coin/notracking
should_track = FALSE

/proc/coin_upkeep()
if(length(GLOB.underworld_coins) < 3)
for(var/obj/effect/landmark/underworldcoin/B in GLOB.landmarks_list)
Expand Down

0 comments on commit 6562703

Please sign in to comment.