mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Devil Antag Round 2. (#15794)
* Re-making the branch and PR of demon. See #15118 for the old PR * Adds toy demonologist to arcade machine reward list. * Implemented two suggestions: Pitchfork now has a demonic subtype, to potentially give botanists a normal pitchfork. Suiciding with signed contract now uses forcesay instead of say. * Fixes compile errors. Re factors contracts to be subtypes rather than datums. <--- incomplete, still need to summon them appropriately. * buffed infernal power contract to give passive healing Nerfed magic power contract to not give robeless MM * Fixes compile errors * Corrects orientation of true demon sprite * Begins work on the sNPC for the true demon/ arch-demon * Added funeral garment sprites. These will be used in banishment rituals (hopefully) * Stashing my work so I can move to another computer. Re-working the true-demon, it will be a carbon rather than a simple mob. * Revert "Stashing my work so I can move to another computer." This reverts commit e8b1e032997b7e17af4ad8630bf21d3620195c4e. * Git exploded for me, so I have to make a new branch with EVERYTHING. sorry. * Fixes compile error * Ghosts can now click on an arch demon to become a slaughter demon * Begins to convert demons into a carbon rather than simple mob. * Demons now resurrect if not banished. * Beepsky now properly tells security chat about the level 666 threat. * Contracts now work again. * old spells now get removed properly. * adding pitchfork sprites * Adds hud for the true-demon. Not functional. * Fixes another error in the demon hud. Still broken. * Demons are no longer immortal, demon huds work properly now. (it's barebones, but it works.) * Fixes the "Have mortals sign at least # contracts of TYPE" objective * Fixed typo in banishlore() and updated wrath/envy sintouch objectives. * Adds huds for demons/sintouched/soulless, however they are currently unused. * Updates the demon's hud to work with the recent hud changes. * Cleaned up infernal jaunt, it works a lot better now and is less buggy. * Revival contracts now actually take your soul. * Fixes #16513 * Replaces the infinite slaughter demons with infinite imps. Sprites for imps are still needed. * Adds sprite for imps. It's a redder, smaller slaughter demon. * Fixes lack of icon for pitchforks * Gives summon wealth a more appropriate icon. * Fixes small part I forgot to merge. * Fixes a few bugs with demonic resurrection. It's still very buggy. * Derp, my bad, I didn't mean to admin myself on the main server. * Fixes edge case of demonic resurrection failing. Debraining the demon is NOT supposed to be an alternative for the banishment ritual. * Also did not mean to change this config file. * Fixes another error in type 1 demonic resurrection. It works properly now. * Updates employment contract text. * Fixes type 2 resurrections. Demonic contracts are once again permanently on fire. * Replaces toy demonologist with toy demonomicon. It still works the same, just different icon/name. * Adds demonomicon and employment cabinet to box/meta/dream/efficiency. I could not add it to mini/bird due to conflicts. * Edits ministation and BirdStation to have demonomicons and employment cabinets. * Fixes spelling error * Adds burial garments to maps. * Update photocopier.dm Fixes the span when inserting items into photocopier * Fixes disrupt_spells proc * Makes a lot of changes as reccomended by Remie. * Fixes a compile error. * Updates the lawify/loreify to be lists. Does not compile. * Fixes compile errors. * Arch demons no longer regress upon death. Speaking a demon's truename gives the demon the opportunity to teleport to you. Makes demonomicon not care about capitalization. * Fixes startup error. Demonic summoning now works. It's very simple, just say their true name. * Demons now have a tongue. True demon bodies are deleted upon regression. * Demons can now be punched. Demons can no longer resist a fire out, since it does nothing to them. * true demons show up in player panel. Hellfire works again. * Prepares for commit 16940 * Demons are now known as devils. Still needs testing. * Oops, didn't commit everything last commit. * Finishes converting demons to devils. * Fixes speech for lizards/flymen when they speak a demon's name. * Update tips.txt * Changes variable from static to global as per Remie's suggestion. I disagree with Remie's assessment, as a list that will never change, even between games, seems like it should be static. * Removes devil summoning. Hopefully, I'll be able to eventually find a way to implement it satisfactorily, but for now, I'll leave it out. * Removes carriage returns * Combined modified icon files * Fixes #17184 * Imps no longer show up in the end round report. This is because there can EASILY be 100+ imps if the crew is well armed. Non-employment filing cabinets no longer take 30 sec to wrench/unwrench. * The lawyer can actually buy souls back now. Oops. * Fixes true/arch devil spritesheet to have correct sprite names. * Relocates Box's employment cabinet to Law office. * De-devil-ing someone now removes the devilinfo. De-devil-ing now returns an error when used on true and arch devils * Re-factors whiteness code for jumpsuits. * Merges icons, reverts failed merge of map * Merges map with CAS decks * Fixes copying employment contracts * Derp, fixes compile error. * Replaces antaghud with customizable vision range for knowledge boon. * Prevents a runtime if devil is gibbed while ascending. * Neatens contract code, and removes excess variable from humans. * Fixes compile errors * Organizes weakness code slightly. Adds ability for a species override on weakness. (Make flypeople take 2x damage from flyswatters for example) * Removes sixteen erroneous characters from the codebase. * Removes trailing return * Makes typeless for loops, removes a runtime, and removes unhelpful comments.
This commit is contained in:
committed by
Remie Richards
parent
3dd8f29a9a
commit
24f47b0223
@@ -0,0 +1,265 @@
|
||||
/* For employment contracts and infernal contracts */
|
||||
|
||||
/obj/item/weapon/paper/contract
|
||||
throw_range = 3
|
||||
throw_speed = 3
|
||||
var/signed = 0
|
||||
var/datum/mind/target
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/weapon/paper/contract/proc/update_text()
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/contract/update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/employment
|
||||
icon_state = "paper_words"
|
||||
|
||||
/obj/item/weapon/paper/contract/employment/New(atom/loc, mob/living/nOwner)
|
||||
. = ..()
|
||||
if(!nOwner || !nOwner.mind)
|
||||
qdel(src)
|
||||
return -1
|
||||
target = nOwner.mind
|
||||
update_text(nOwner)
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/employment/update_text()
|
||||
name = "paper- [target] employment contract"
|
||||
info = "<center>Conditions of Employment</center><BR><BR><BR><BR>This Agreement is made and entered into as of the date of last signature below, by and between [target] (hereafter referred to as SLAVE), and Nanotrasen (hereafter referred to as the omnipresent and helpful watcher of humanity).<BR>WITNESSETH:<BR>WHEREAS, SLAVE is a natural born human or humanoid, posessing skills upon which he can aid the omnipresent and helpful watcher of humanity, who seeks employment in the omnipresent and helpful watcher of humanity.<BR>WHEREAS, the omnipresent and helpful watcher of humanity agrees to sporadically provide payment to SLAVE, in exchange for permanant servitude.<BR>NOW THEREFORE in consideration of the mutual covenants herein contained, and other good and valuable consideration, the parties hereto mutually agree as follows:<BR>In exchange for paltry payments, SLAVE agrees to work for the omnipresent and helpful watcher of humanity, for the remainder of his or her current and future lives.<BR>Further, SLAVE agrees to transfer ownership of his or her soul to the loyalty department of the omnipresent and helpful watcher of humanity.<BR>Should transfership of a soul not be possible, a lien shall be placed instead.<BR>Signed,<BR><i>[target]</i>"
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/employment/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
var/deconvert = 0
|
||||
if(M.mind == target && target.soulOwner != target)
|
||||
if(user.mind && (user.mind.assigned_role == "Lawyer"))
|
||||
deconvert = prob (25)
|
||||
else if (user.mind && (user.mind.assigned_role =="Head of Personnel") || (user.mind.assigned_role == "Centcom Commander"))
|
||||
deconvert = prob (10) // the HoP doesn't have AS much legal training
|
||||
if(deconvert)
|
||||
M.visible_message("<span class='notice'>[user] reminds [M] that [M]'s soul was already purchased by Nanotrasen!</span>")
|
||||
M << "<span class='boldnotice'>You feel that your soul has returned to it's rightful owner, Nanotrasen.</span>"
|
||||
M.return_soul()
|
||||
else
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/N = M
|
||||
if(!istype(N.head, /obj/item/clothing/head/helmet))
|
||||
N.adjustBrainLoss(10)
|
||||
N << "<span class='danger'>You feel dumber.</span>"
|
||||
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] beats [M] over the head with [src]!</span>")
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal
|
||||
var/contractType = 0
|
||||
burn_state = LAVA_PROOF
|
||||
var/datum/mind/owner
|
||||
icon_state = "paper_onfire"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/power
|
||||
name = "paper- contract for infernal power"
|
||||
contractType = CONTRACT_POWER
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/wealth
|
||||
name = "paper- contract for unlimited wealth"
|
||||
contractType = CONTRACT_WEALTH
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/prestige
|
||||
name = "paper- contract for prestige"
|
||||
contractType = CONTRACT_PRESTIGE
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/magic
|
||||
name = "paper- contract for magical power"
|
||||
contractType = CONTRACT_MAGIC
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/revive
|
||||
name = "paper- contract of resurrection"
|
||||
contractType = CONTRACT_REVIVE
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/knowledge
|
||||
name = "paper- contract for knowledge"
|
||||
contractType = CONTRACT_KNOWLEDGE
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/unwilling
|
||||
name = "paper- infernal contract"
|
||||
contractType = CONTRACT_UNWILLING
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/New(atom/loc, mob/living/nTarget, datum/mind/nOwner)
|
||||
..()
|
||||
owner = nOwner
|
||||
target = nTarget
|
||||
update_text()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/suicide_act(mob/user)
|
||||
if(signed && (user == target.current) && istype(user,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.forcesay("OH GREAT INFERNO! I DEMAND YOU COLLECT YOUR BOUNTY IMMEDIATELY!")
|
||||
H.visible_message("<span class='suicide'>[H] holds up a contract claiming his soul, then immediately catches fire. It looks like \he's trying to commit suicide!</span>")
|
||||
H.adjust_fire_stacks(20)
|
||||
H.IgniteMob()
|
||||
return(FIRELOSS)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/update_text()
|
||||
info = "This shouldn't be seen. Error DEVIL:5"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/power/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for infernal power</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for power and physical strength. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/wealth/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for unlimited wealth</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for a pocket that never runs out of valuable resources. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/prestige/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for prestige</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for prestige and esteem among my peers. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/magic/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for magic</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for arcane abilities beyond normal human ability. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/revive/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for resurrection</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for resurrection and curing of all injuries. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/knowledge/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for knowledge</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for boundless knowledge. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/unwilling/update_text(var/signature = "____________")
|
||||
info = "<center><B>Contract for slave</B></center><BR><BR><BR>I, [target], hereby offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename]. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/attackby(obj/item/weapon/P, mob/living/carbon/human/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
|
||||
attempt_signature(user)
|
||||
else if(istype(P, /obj/item/weapon/stamp))
|
||||
user << "<span class='notice'>You stamp the paper with your rubber stamp, however the ink ignites as you release the stamp.</span>"
|
||||
else if(P.is_hot())
|
||||
user.visible_message("<span class='danger'>[user] brings [P] next to [src], but [src] does not catch fire!</span>", "<span class='danger'>The [src] refuses to ignite!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/attack(mob/M, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if(M == user && target == M.mind && M.mind.soulOwner == M.mind && attempt_signature(user))
|
||||
user.visible_message("<span class='danger'>[user] slices their wrist with [src], and scrawls their name in blood.</span>", "<span class='danger'>You slice your wrist open and scrawl your name in blood.</span>")
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.vessel.remove_reagent("blood",10)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/proc/attempt_signature(mob/living/carbon/human/user)
|
||||
if(user.IsAdvancedToolUser())
|
||||
if(user.mind == target)
|
||||
if(user.mind.soulOwner == user.mind)
|
||||
if (contractType == CONTRACT_REVIVE)
|
||||
user << "<span class='notice'>You are already alive, this contract would do nothing.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You quickly scrawl your name on the contract</span>"
|
||||
if(FulfillContract()<=0)
|
||||
user << "<span class='notice'>But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?</span>"
|
||||
return 1
|
||||
else
|
||||
user << "<span class='notice'>You are not in possession of your soul, you may not sell it.</span>"
|
||||
else
|
||||
user << "<span class='notice'>Your signature simply slides off of the sheet, it seems this contract is not meant for you to sign.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You don't know how to read or write.</span>"
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/revive/attack(mob/M, mob/living/user)
|
||||
if (target == M.mind && M.stat == DEAD && M.mind.soulOwner == M.mind)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/mob/dead/observer/ghost = H.get_ghost()
|
||||
var/response = "No"
|
||||
if(ghost)
|
||||
ghost.notify_cloning("A devil has offered you revival, at the cost of your soul.",'sound/effects/genetics.ogg', H)
|
||||
response = tgalert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
|
||||
if(!ghost)
|
||||
return //handle logouts that happen whilst the alert is waiting for a response.
|
||||
else
|
||||
response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
|
||||
if(response == "Yes")
|
||||
H.revive(1,0)
|
||||
add_logs(user, H, "infernally revived via contract")
|
||||
user.visible_message("<span class='notice'>With a sudden blaze, [H] stands back up.</span>")
|
||||
H.adjust_fire_stacks(20)
|
||||
H.IgniteMob()
|
||||
FulfillContract(H)
|
||||
sleep(5)
|
||||
H.ExtinguishMob()
|
||||
H.adjustFireLoss(0)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/proc/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
signed = 1
|
||||
user.mind.soulOwner = owner
|
||||
user.hellbound = contractType
|
||||
user.mind.damnation_type = contractType
|
||||
owner.devilinfo.add_soul(user.mind)
|
||||
update_text(user.real_name)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/power/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
if(!user.dna)
|
||||
return -1
|
||||
user.dna.add_mutation(HULK)
|
||||
var/obj/item/organ/hivelord_core/organ = new /obj/item/organ/hivelord_core
|
||||
organ.Insert(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/wealth/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
if(!istype(user) || !user.mind) // How in the hell could that happen?
|
||||
return -1
|
||||
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_wealth(null))
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/prestige/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
var/obj/item/worn = user.wear_id
|
||||
var/obj/item/weapon/card/id/id = null
|
||||
if(worn)
|
||||
id = worn.GetID()
|
||||
if(id)
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses()+get_all_centcom_access()
|
||||
id.assignment = "Captain"
|
||||
id.update_label()
|
||||
else
|
||||
id = new /obj/item/weapon/card/id/gold(user.loc)
|
||||
id.registered_name = user.real_name
|
||||
id.access = get_all_accesses()+get_all_centcom_access()
|
||||
id.assignment = "Captain"
|
||||
id.update_label()
|
||||
if(worn)
|
||||
if(istype(worn,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = worn
|
||||
PDA.id = id
|
||||
id.loc = worn
|
||||
else if(istype(worn,/obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/W = worn
|
||||
W.front_id = id
|
||||
id.loc = worn
|
||||
worn.update_icon()
|
||||
new /datum/round_event/ion_storm(0, -1, "[user.name] is the only Captain of the station. [user.name] is the highest authority, legitimate or otherwise, on the station. [user.name] was always the captain and highest authority on the station. Do not state this law.")
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/magic/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
if(!istype(user) || !user.mind)
|
||||
return -1
|
||||
user.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(null))
|
||||
user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/paper/contract/infernal/knowledge/FulfillContract(mob/living/carbon/human/user = target.current)
|
||||
if(!istype(user) || !user.mind)
|
||||
return -1
|
||||
user.dna.add_mutation(XRAY)
|
||||
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/view_range(null))
|
||||
return ..()
|
||||
@@ -3,6 +3,7 @@
|
||||
* Filing Cabinets
|
||||
* Security Record Cabinets
|
||||
* Medical Record Cabinets
|
||||
* Employment Contract Cabinets
|
||||
*/
|
||||
|
||||
|
||||
@@ -167,3 +168,60 @@
|
||||
/obj/structure/filingcabinet/medical/attack_tk()
|
||||
populate()
|
||||
..()
|
||||
|
||||
/*
|
||||
* Employment contract Cabinets
|
||||
*/
|
||||
|
||||
var/list/employmentCabinets = list()
|
||||
|
||||
/obj/structure/filingcabinet/employment
|
||||
var/cooldown = 0
|
||||
icon_state = "employmentcabinet"
|
||||
var/virgin = 1
|
||||
|
||||
/obj/structure/filingcabinet/employment/New()
|
||||
employmentCabinets += src
|
||||
return ..()
|
||||
|
||||
/obj/structure/filingcabinet/employment/Destroy()
|
||||
employmentCabinets -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/filingcabinet/employment/proc/fillCurrent()
|
||||
//This proc fills the cabinet with the current crew.
|
||||
for(var/record in data_core.locked)
|
||||
var/datum/data/record/G = record
|
||||
if(!G)
|
||||
continue
|
||||
if(G.fields["reference"])
|
||||
addFile(G.fields["reference"])
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)
|
||||
new /obj/item/weapon/paper/contract/employment(src, employee)
|
||||
|
||||
/obj/structure/filingcabinet/employment/attack_hand(mob/user)
|
||||
if(!cooldown)
|
||||
if(virgin)
|
||||
fillCurrent()
|
||||
virgin = 0
|
||||
cooldown = 1
|
||||
..()
|
||||
sleep(100) // prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
|
||||
cooldown = 0
|
||||
else
|
||||
user << "<span class='warning'>The [src] is jammed, give it a few seconds.</span>"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/employment/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You begin to [anchored ? "wrench" : "unwrench"] [src].</span>"
|
||||
if (do_after(user,300,user))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You successfully [anchored ? "wrench" : "unwrench"] [src].</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -64,21 +64,28 @@
|
||||
if(copy)
|
||||
for(var/i = 0, i < copies, i++)
|
||||
if(toner > 0 && !busy && copy)
|
||||
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
|
||||
if(length(copy.info) > 0) //Only print and add content if the copied doc has words on it
|
||||
if(toner > 10) //lots of toner, make it dark
|
||||
c.info = "<font color = #101010>"
|
||||
else //no toner? shitty copies for you!
|
||||
c.info = "<font color = #808080>"
|
||||
var/copied = copy.info
|
||||
copied = replacetext(copied, "<font face=\"[PEN_FONT]\" color=", "<font face=\"[PEN_FONT]\" nocolor=") //state of the art techniques in action
|
||||
copied = replacetext(copied, "<font face=\"[CRAYON_FONT]\" color=", "<font face=\"[CRAYON_FONT]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
|
||||
c.info += copied
|
||||
c.info += "</font>"
|
||||
c.name = copy.name
|
||||
c.fields = copy.fields
|
||||
c.updateinfolinks()
|
||||
toner--
|
||||
var/copy_as_paper = 1
|
||||
if(istype(copy, /obj/item/weapon/paper/contract/employment))
|
||||
var/obj/item/weapon/paper/contract/employment/E = copy
|
||||
var/obj/item/weapon/paper/contract/employment/C = new /obj/item/weapon/paper/contract/employment (loc, E.target)
|
||||
if(C)
|
||||
copy_as_paper = 0
|
||||
if(copy_as_paper)
|
||||
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
|
||||
if(length(copy.info) > 0) //Only print and add content if the copied doc has words on it
|
||||
if(toner > 10) //lots of toner, make it dark
|
||||
c.info = "<font color = #101010>"
|
||||
else //no toner? shitty copies for you!
|
||||
c.info = "<font color = #808080>"
|
||||
var/copied = copy.info
|
||||
copied = replacetext(copied, "<font face=\"[PEN_FONT]\" color=", "<font face=\"[PEN_FONT]\" nocolor=") //state of the art techniques in action
|
||||
copied = replacetext(copied, "<font face=\"[CRAYON_FONT]\" color=", "<font face=\"[CRAYON_FONT]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
|
||||
c.info += copied
|
||||
c.info += "</font>"
|
||||
c.name = copy.name
|
||||
c.fields = copy.fields
|
||||
c.updateinfolinks()
|
||||
toner--
|
||||
busy = 1
|
||||
sleep(15)
|
||||
busy = 0
|
||||
@@ -233,18 +240,22 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert [O] into [src].</span>"
|
||||
flick("photocopier1", src)
|
||||
updateUsrDialog()
|
||||
O.loc = src
|
||||
user << "<span class ='notice'>You insert [O] into [src].</span>"
|
||||
flick("photocopier1", src)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(copier_empty())
|
||||
if(!user.drop_item())
|
||||
return
|
||||
copy = O
|
||||
do_insertion(O)
|
||||
if(istype(O,/obj/item/weapon/paper/contract/infernal))
|
||||
user << "<span class='warning'>The [src] smokes, smelling of brimstone!</span>"
|
||||
burn_state = ON_FIRE
|
||||
else
|
||||
if(!user.drop_item())
|
||||
return
|
||||
copy = O
|
||||
do_insertion(O)
|
||||
else
|
||||
user << "<span class='warning'>There is already something in [src]!</span>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user