mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 17:22:23 +00:00
Fixes more compile errors. Down to 65 now. updates << into to_chat Down to 60 errors, also starts to port the codex gigas and law 666 for cyborg devils. Fixes more compile errors. Down to 41 now. Replaces timers with spawns, and <<s with to_chats 40 compile errors. Down to 34 compile errors. whoops, actually down to 34 now. Down to 25 compile errors. Down to 15 compile errors, I'llprobably need some help at this point. Woo! Down to 7 compile errors. Ported over devil hud. Number of errors up to 19. WOO! It compiles. It's completely untested, but it compiles. Adds devils to traitor panel Implements iron, silver and salt banes. implements flashing lights bane Selling your soul prevents cloning, and some other methods of revival. Implements harvest bane Merged and sorted icons/obj/bureaucracy.dmi Adds toy codex gigas Fixes compile errors, adds codex gigas sprite. Lots of bug fixes. Contracts work, devil revival is more consistant, etc Adds missing icons for flaming contracts, summon pitchfork, summon wealth, employment cabinet, and sintouch. Converts DEEP LORE explanations from hell to inferno incorporated. Banishes the compile errors. Devils come from hell again. replaces offer drink obligation with a much more lore appropriate devil's fiddle reference Also fixes contract bashing brain damage chance. Undoes some changes I accidentally did to example config files. Fixes up a few remaining bugs. Puts in the codex gigas and employment contract cabinets. -- Lemon - I kinda skipped this one, I'll patch it back in later because map conflicts are suffering incarnate Solves the devil law problem in a REALLY hacky snowflake way. Fixes a few methods in which a hellbound can be revived. Devils respawn with a limited number of appropriate items, instead of COMPLETELY naked upon corpse destruction. Also adds lines to example config. Updates devil laws to be less hacky. Objective to sintouch x mortals now greentexts correctly. Contracts no longer cause brain damage. I didn't realize it was lethal on this codebase. Oops. Splits dust(visual_only) into dust() and dust_animation() procs Fixes some defines. Adds undef statements to improve compile times. Fixes race changes from demonic form changes. Fixes small runtime error. (Which somehow didn't break anything?) Implements lots of small changes/corrections suggested by CrazyLemon64 I still need to test these changes, along with other potential issues he brought up. Fixes harvest bane and power contracts. Also adds a few </span> tag enders. Corrects some edge cases with revival contracts. Fixes compile error. Reverts unneccecary change to item/weapon/reagent_containers Cleans up the code for readability. Prevents cloning of hellbound individuals. Latejoins now properly have employment contracts added to employment cabinets (provided they still exist) Infernal contracts are no longer rendered unreadable by fire and alcohol. All fireproof paper remains readable after being fireballed, not just infernal contracts. (Though infernal contracts are the only fireproof paper atm) Fixes an edge case problem with cloning. Adds is_revivable proc to mind. Removes snowflake code involving preventing soulseller resurrection. Indulges in the sin of sloth, and copies tg's lazy list macros Proc calls that transform the user no longer go to a null target Fixes devil UI, human regression will keep appearance, and adds danceoff Devil's base forms no longer suffocate inside the devil Fixes runtimes, gets stuff working The arch devil can now blast down walls with their pitchfork EXTERMINATE ALL SPIRITS Activates devil clause in voice of god Fawks Mcclood Feature P A R I T Y Fixes devil bugs from testing - Does a death refactor to make sure that diabolical resurrection works - Walls no longer leave girders when blasted by the devil - Getting a new body gives you a rudimentary amount of equipment to work with to get out of maintenance or whereever Does all the icons in a single commit on their own because icon conflicts suck Starting point of extra devil rebalance/fixes Ports devil friends Also oops tramples all over Fethas' corpse PR that's still up I need to take care of that one Styling fixes
216 lines
6.2 KiB
Plaintext
216 lines
6.2 KiB
Plaintext
/mob/living
|
|
var/list/ownedSoullinks //soullinks we are the owner of
|
|
var/list/sharedSoullinks //soullinks we are a/the sharer of
|
|
|
|
/mob/living/Destroy()
|
|
for(var/s in ownedSoullinks)
|
|
var/datum/soullink/S = s
|
|
S.ownerDies(FALSE)
|
|
qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d
|
|
ownedSoullinks = null
|
|
for(var/s in sharedSoullinks)
|
|
var/datum/soullink/S = s
|
|
S.sharerDies(FALSE)
|
|
S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed
|
|
sharedSoullinks = null
|
|
return ..()
|
|
|
|
//Keeps track of a Mob->Mob (potentially Player->Player) connection
|
|
//Can be used to trigger actions on one party when events happen to another
|
|
//Eg: shared deaths
|
|
//Can be used to form a linked list of mob-hopping
|
|
//Does NOT transfer with minds
|
|
/datum/soullink
|
|
var/mob/living/soulowner
|
|
var/mob/living/soulsharer
|
|
var/id //Optional ID, for tagging and finding specific instances
|
|
|
|
/datum/soullink/Destroy()
|
|
if(soulowner)
|
|
LAZYREMOVE(soulowner.ownedSoullinks, src)
|
|
soulowner = null
|
|
if(soulsharer)
|
|
LAZYREMOVE(soulsharer.sharedSoullinks, src)
|
|
soulsharer = null
|
|
return ..()
|
|
|
|
/datum/soullink/proc/removeSoulsharer(mob/living/sharer)
|
|
if(soulsharer == sharer)
|
|
soulsharer = null
|
|
LAZYREMOVE(sharer.sharedSoullinks, src)
|
|
|
|
//Used to assign variables, called primarily by soullink()
|
|
//Override this to create more unique soullinks (Eg: 1->Many relationships)
|
|
//Return TRUE/FALSE to return the soullink/null in soullink()
|
|
/datum/soullink/proc/parseArgs(mob/living/owner, mob/living/sharer)
|
|
if(!owner || !sharer)
|
|
return FALSE
|
|
soulowner = owner
|
|
soulsharer = sharer
|
|
LAZYADD(owner.ownedSoullinks, src)
|
|
LAZYADD(sharer.sharedSoullinks, src)
|
|
return TRUE
|
|
|
|
//Runs after /living death()
|
|
//Override this for content
|
|
/datum/soullink/proc/ownerDies(gibbed, mob/living/owner)
|
|
|
|
//Runs after /living death()
|
|
//Override this for content
|
|
/datum/soullink/proc/sharerDies(gibbed, mob/living/owner)
|
|
|
|
//Runs after /living update_revive()
|
|
//Override this for content
|
|
/datum/soullink/proc/ownerRevives(mob/living/owner)
|
|
|
|
//Runs after /living update_revive()
|
|
//Override this for content
|
|
/datum/soullink/proc/sharerRevives(mob/living/owner)
|
|
|
|
//Quick-use helper
|
|
/proc/soullink(typepath, ...)
|
|
var/datum/soullink/S = new typepath()
|
|
if(S.parseArgs(arglist(args.Copy(2, 0))))
|
|
return S
|
|
|
|
|
|
|
|
/////////////////
|
|
// MULTISHARER //
|
|
/////////////////
|
|
//Abstract soullink for use with 1 Owner -> Many Sharer setups
|
|
/datum/soullink/multisharer
|
|
var/list/soulsharers
|
|
|
|
/datum/soullink/multisharer/parseArgs(mob/living/owner, list/sharers)
|
|
if(!owner || !LAZYLEN(sharers))
|
|
return FALSE
|
|
soulowner = owner
|
|
soulsharers = sharers
|
|
LAZYADD(owner.ownedSoullinks, src)
|
|
for(var/l in sharers)
|
|
var/mob/living/L = l
|
|
LAZYADD(L.sharedSoullinks, src)
|
|
return TRUE
|
|
|
|
/datum/soullink/multisharer/removeSoulsharer(mob/living/sharer)
|
|
LAZYREMOVE(soulsharers, sharer)
|
|
|
|
|
|
|
|
/////////////////
|
|
// SHARED FATE //
|
|
/////////////////
|
|
//When the soulowner dies, the soulsharer dies, and vice versa
|
|
//This is intended for two players(or AI) and two mobs
|
|
|
|
/datum/soullink/sharedfate/ownerDies(gibbed, mob/living/owner)
|
|
if(soulsharer)
|
|
soulsharer.death(gibbed)
|
|
|
|
/datum/soullink/sharedfate/sharerDies(gibbed, mob/living/sharer)
|
|
if(soulowner)
|
|
soulowner.death(gibbed)
|
|
|
|
/////////////////
|
|
// Demon Bind //
|
|
/////////////////
|
|
//When the soulowner dies, the soulsharer dies, but NOT vice versa
|
|
//This is intended for two players(or AI) and two mobs
|
|
|
|
/datum/soullink/oneway/ownerDies(gibbed, mob/living/owner)
|
|
if(soulsharer)
|
|
soulsharer.dust(FALSE)
|
|
|
|
/datum/soullink/oneway/devilfriend
|
|
|
|
/////////////////
|
|
// SHARED BODY //
|
|
/////////////////
|
|
//When the soulsharer dies, they're placed in the soulowner, who remains alive
|
|
//If the soulowner dies, the soulsharer is killed and placed into the soulowner (who is still dying)
|
|
//This one is intended for one player moving between many mobs
|
|
|
|
/datum/soullink/sharedbody/ownerDies(gibbed, mob/living/owner)
|
|
if(soulowner && soulsharer)
|
|
if(soulsharer.mind)
|
|
soulsharer.mind.transfer_to(soulowner)
|
|
soulsharer.death(gibbed)
|
|
|
|
/datum/soullink/sharedbody/sharerDies(gibbed, mob/living/sharer)
|
|
if(soulowner && soulsharer && soulsharer.mind)
|
|
soulsharer.mind.transfer_to(soulowner)
|
|
|
|
|
|
|
|
//////////////////////
|
|
// REPLACEMENT POOL //
|
|
//////////////////////
|
|
//When the owner dies, one of the sharers is placed in the owner's body, fully healed
|
|
//Sort of a "winner-stays-on" soullink
|
|
//Gibbing ends it immediately
|
|
|
|
/datum/soullink/multisharer/replacementpool/ownerDies(gibbed, mob/living/owner)
|
|
if(LAZYLEN(soulsharers) && !gibbed) //let's not put them in some gibs
|
|
var/list/souls = shuffle(soulsharers.Copy())
|
|
for(var/l in souls)
|
|
var/mob/living/L = l
|
|
if(L.stat != DEAD && L.mind)
|
|
L.mind.transfer_to(soulowner)
|
|
soulowner.revive(TRUE, TRUE)
|
|
L.death(FALSE)
|
|
|
|
//Lose your claim to the throne!
|
|
/datum/soullink/multisharer/replacementpool/sharerDies(gibbed, mob/living/sharer)
|
|
removeSoulsharer(sharer)
|
|
|
|
|
|
////////////////
|
|
// SOUL HOOK //
|
|
////////////////
|
|
// When the owner transitions from dead to alive or vice versa,
|
|
// the linked atom is notified
|
|
|
|
// Atoms that actually utilize this system are responsible for handling the GC cleanup themselves
|
|
// Splashing the GC handling onto every atom would be a big old waste
|
|
|
|
/datum/soullink/soulhook
|
|
var/atom/movable/otherend
|
|
|
|
/datum/soullink/soulhook/Destroy()
|
|
if(otherend)
|
|
LAZYREMOVE(otherend.sharedSoulhooks, src)
|
|
otherend = null
|
|
return ..()
|
|
|
|
/datum/soullink/soulhook/parseArgs(mob/living/owner, atom/movable/other)
|
|
if(!owner || !other)
|
|
return FALSE
|
|
soulowner = owner
|
|
otherend = other
|
|
LAZYADD(owner.ownedSoullinks, src)
|
|
LAZYADD(other.sharedSoulhooks, src)
|
|
return TRUE
|
|
|
|
/datum/soullink/soulhook/ownerDies(gibbed, mob/living/owner)
|
|
if(otherend)
|
|
otherend.onSoullinkDeath(gibbed, owner)
|
|
|
|
/datum/soullink/soulhook/ownerRevives(mob/living/owner)
|
|
if(otherend)
|
|
otherend.onSoullinkRevive(owner)
|
|
|
|
// oops I'm butchering the application of this
|
|
/datum/soullink/soulhook/removeSoulsharer(atom/movable/other)
|
|
if(otherend == other)
|
|
otherend = null
|
|
LAZYREMOVE(other.sharedSoulhooks, src)
|
|
qdel(src) // not much point in a soul link with one end out of the picture for good
|
|
|
|
/atom/movable
|
|
var/list/sharedSoulhooks = null
|
|
|
|
/atom/movable/proc/onSoullinkDeath(gibbed, mob/living/owner)
|
|
|
|
/atom/movable/proc/onSoullinkRevive(mob/living/owner)
|