Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
@@ -1,200 +0,0 @@
//Components: Used in scripture.
/obj/item/clockwork/component
name = "meme component"
desc = "A piece of a famous meme."
clockwork_desc = null
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/component_id //What the component is identified as
var/cultist_message = "You are not worthy of this meme." //Showed to Nar-Sian cultists if they pick up the component in addition to chaplains
var/list/servant_of_ratvar_messages = list("ayy" = FALSE, "lmao" = TRUE) //Fluff, shown to servants of Ratvar on a low chance, if associated value is TRUE, will automatically apply ratvarian
var/message_span = "heavy_brass"
/obj/item/clockwork/component/pickup(mob/living/user)
..()
if(iscultist(user) || (user.mind && user.mind.isholy))
user << "<span class='[message_span]'>[cultist_message]</span>"
if(user.mind && user.mind.isholy)
user << "<span class='boldannounce'>The power of your faith melts away the [src]!</span>"
var/obj/item/weapon/ore/slag/wrath = new /obj/item/weapon/ore/slag
user.unEquip(src)
user.put_in_active_hand(wrath)
qdel(src)
if(is_servant_of_ratvar(user) && prob(20))
var/pickedmessage = pick(servant_of_ratvar_messages)
user << "<span class='[message_span]'>[servant_of_ratvar_messages[pickedmessage] ? "[text2ratvar(pickedmessage)]" : pickedmessage]</span>"
/obj/item/clockwork/component/examine(mob/user)
..()
if(is_servant_of_ratvar(user))
user << "<span class='[message_span]'>You should put this in a slab or cache immediately.</span>"
/obj/item/clockwork/component/belligerent_eye
name = "belligerent eye"
desc = "A brass construct with a rotating red center. It's as though it's looking for something to hurt."
icon_state = "belligerent_eye"
component_id = BELLIGERENT_EYE
cultist_message = "The eye gives you an intensely hateful glare."
servant_of_ratvar_messages = list("\"...\"" = FALSE, "For a moment, your mind is flooded with extremely violent thoughts." = FALSE, "\"...Die.\"" = TRUE)
message_span = "neovgre"
/obj/item/clockwork/component/belligerent_eye/blind_eye
name = "blind eye"
desc = "A heavy brass eye, its red iris fallen dark."
clockwork_desc = "A smashed ocular warden covered in dents. <b>Serviceable as a substitute for a belligerent eye.</b>"
icon_state = "blind_eye"
cultist_message = "The eye flickers at you with intense hate before falling dark."
servant_of_ratvar_messages = list("The eye flickers before falling dark." = FALSE, "You feel watched." = FALSE, "\"...\"" = FALSE)
w_class = WEIGHT_CLASS_NORMAL
/obj/item/clockwork/component/vanguard_cogwheel
name = "vanguard cogwheel"
desc = "A sturdy brass cog with a faintly glowing blue gem in its center."
icon_state = "vanguard_cogwheel"
component_id = VANGUARD_COGWHEEL
cultist_message = "\"Pray to your god that we never meet.\""
servant_of_ratvar_messages = list("\"Be safe, child.\"" = FALSE, "You feel unexplainably comforted." = FALSE, "\"Never forget: Pain is temporary. What you do for the Justiciar is eternal.\"" = FALSE)
message_span = "inathneq"
/obj/item/clockwork/component/vanguard_cogwheel/pinion_lock
name = "pinion lock"
desc = "A dented and scratched gear. It's very heavy."
clockwork_desc = "A broken gear lock for pinion airlocks. <b>Serviceable as a substitute for a vanguard cogwheel.</b>"
icon_state = "pinion_lock"
cultist_message = "The gear grows warm in your hands."
servant_of_ratvar_messages = list("The lock isn't getting any lighter." = FALSE, "\"Damaged gears are better than broken bodies.\"" = TRUE, \
"\"It's a shame it can't be reused.\"" = TRUE)
w_class = WEIGHT_CLASS_NORMAL
/obj/item/clockwork/component/geis_capacitor
name = "geis capacitor"
desc = "A curiously cold brass doodad. It seems as though it really doesn't appreciate being held."
icon_state = "geis_capacitor"
component_id = GEIS_CAPACITOR
cultist_message = "\"Try not to lose your mind - I'll need it. Heh heh...\""
servant_of_ratvar_messages = list("\"Disgusting.\"" = FALSE, "\"Well, aren't you an inquisitive fellow?\"" = FALSE, "A foul presence pervades your mind, then vanishes." = FALSE, \
"\"The fact that Ratvar has to depend on simpletons like you is appalling.\"" = FALSE)
message_span = "sevtug"
/obj/item/clockwork/component/geis_capacitor/antennae
name = "mania motor antennae"
desc = "A pair of dented and bent antennae. They constantly emit a static hiss."
clockwork_desc = "The antennae from a mania motor. <b>Serviceable as a substitute for a geis capacitor.</b>"
icon_state = "mania_motor_antennae"
cultist_message = "Your head is filled with a burst of static."
servant_of_ratvar_messages = list("\"Who broke this.\"" = TRUE, "\"Did you break these off YOURSELF?\"" = TRUE, "\"Why did we give this to such simpletons, anyway?\"" = TRUE, \
"\"At least we can use these for something - unlike you.\"" = TRUE)
//Replicant Alloy. Used for fuel and construction, and not merely scripture.
/obj/item/clockwork/component/replicant_alloy
name = "replicant alloy"
desc = "A seemingly strong but very malleable chunk of metal. It seems as though it wants to be molded into something greater."
icon_state = "replicant_alloy"
component_id = REPLICANT_ALLOY
cultist_message = "The alloy takes on the appearance of a screaming face for a moment."
servant_of_ratvar_messages = list("\"There's always something to be done. Get to it.\"" = FALSE, "\"Idle hands are worse than broken ones. Get to work.\"" = FALSE, \
"A detailed image of Ratvar appears in the alloy for a moment." = FALSE)
message_span = "nezbere"
/obj/item/clockwork/component/replicant_alloy/examine(mob/user)
..()
if(is_servant_of_ratvar(user))
user << "<span class='alloy'>Can be used to fuel Clockwork Proselytizers and Mending Motors, or shaped into brass sheets.</span>"
/obj/item/clockwork/component/replicant_alloy/attack_self(mob/user)
if(is_servant_of_ratvar(user))
var/obj/item/stack/tile/brass/B = new /obj/item/stack/tile/brass(get_turf(src), 10)
user.unEquip(src, TRUE)
user.put_in_hands(B)
user << "<span class='brass'>You shape the alloy into some brass sheets.</span>"
qdel(src)
/obj/item/clockwork/component/replicant_alloy/smashed_anima_fragment
name = "smashed anima fragment"
desc = "Shattered chunks of metal. Damaged beyond repair and completely unusable."
clockwork_desc = "The sad remains of an anima fragment. <b>Serviceable as a substitute for replicant alloy.</b>"
icon_state = "smashed_anime_fragment"
cultist_message = "The shards vibrate in your hands for a moment."
servant_of_ratvar_messages = list("\"...still fight...\"" = FALSE, "\"...where am I...?\"" = FALSE, "\"...put me... slab...\"" = FALSE)
message_span = "heavy_brass"
w_class = WEIGHT_CLASS_NORMAL
/obj/item/clockwork/component/replicant_alloy/fallen_armor
name = "fallen armor"
desc = "Lifeless chunks of armor. They're designed in a strange way and won't fit on you."
clockwork_desc = "The armor from a former clockwork marauder. <b>Serviceable as a substitute for replicant alloy.</b>"
icon_state = "fallen_armor"
cultist_message = "Red flame sputters from the mask's eye before winking out."
servant_of_ratvar_messages = list("A piece of armor hovers away from the others for a moment." = FALSE, "Red flame appears in the cuirass before sputtering out." = FALSE)
message_span = "heavy_brass"
w_class = WEIGHT_CLASS_NORMAL
/obj/item/clockwork/component/hierophant_ansible
name = "hierophant ansible"
desc = "Some sort of transmitter? It seems as though it's trying to say something."
icon_state = "hierophant_ansible"
component_id = HIEROPHANT_ANSIBLE
cultist_message = "\"Gur obff fnlf vg'f abg ntnvafg gur ehyrf gb-xvyy lbh.\""
servant_of_ratvar_messages = list("\"Exile is such a bore. There's nothing I can hunt in here.\"" = TRUE, "\"What's keeping you? I want to go kill something.\"" = TRUE, \
"\"HEHEHEHEHEHEH!\"" = FALSE, "\"If I killed you fast enough, do you think the boss would notice?\"" = TRUE)
message_span = "nzcrentr"
/obj/item/clockwork/component/hierophant_ansible/obelisk
name = "obelisk prism"
desc = "A prism that occasionally glows brightly. It seems not-quite there."
clockwork_desc = "The prism from a clockwork obelisk. <b>Serviceable as a substitute for a hierophant ansible.</b>"
cultist_message = "The prism flickers wildly in your hands before resuming its normal glow."
servant_of_ratvar_messages = list("You hear the distinctive sound of the Hierophant Network for a moment." = FALSE, "\"Hieroph'ant Br'o'adcas't fail'ure.\"" = TRUE, \
"The obelisk flickers wildly, as if trying to open a gateway." = FALSE, "\"Spa'tial Ga'tewa'y fai'lure.\"" = TRUE)
icon_state = "obelisk_prism"
w_class = WEIGHT_CLASS_NORMAL
//Shards of Alloy, suitable only for proselytization.
/obj/item/clockwork/alloy_shards
name = "replicant alloy shards"
desc = "Broken shards of some oddly malleable metal. They occasionally move and seem to glow."
clockwork_desc = "Broken shards of replicant alloy. Could be proselytized for liquified replicant alloy."
icon_state = "alloy_shards"
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/randomsinglesprite = FALSE
var/randomspritemax = 2
/obj/item/clockwork/alloy_shards/New()
..()
if(randomsinglesprite)
replace_name_desc()
icon_state = "[icon_state][rand(1, randomspritemax)]"
pixel_x = rand(-9, 9)
pixel_y = rand(-9, 9)
/obj/item/clockwork/alloy_shards/proc/replace_name_desc()
name = "replicant alloy shard"
desc = "A broken shard of some oddly malleable metal. It occasionally moves and seems to glow."
clockwork_desc = "A broken shard of replicant alloy. Could be proselytized for liquified replicant alloy."
/obj/item/clockwork/alloy_shards/large
randomsinglesprite = TRUE
icon_state = "shard_large"
/obj/item/clockwork/alloy_shards/medium
randomsinglesprite = TRUE
icon_state = "shard_medium"
/obj/item/clockwork/alloy_shards/medium/gear_bit
randomspritemax = 4
icon_state = "gear_bit"
/obj/item/clockwork/alloy_shards/medium/gear_bit/replace_name_desc()
name = "gear bit"
desc = "A broken chunk of a gear. You want it."
clockwork_desc = "A broken chunk of a gear. Could be proselytized for liquified replicant alloy."
/obj/item/clockwork/alloy_shards/medium/gear_bit/large //gives more alloy
/obj/item/clockwork/alloy_shards/medium/gear_bit/large/replace_name_desc()
..()
name = "complex gear bit"
/obj/item/clockwork/alloy_shards/small
randomsinglesprite = TRUE
randomspritemax = 3
icon_state = "shard_small"
@@ -1,216 +0,0 @@
//Clockwork armor: High melee protection but weak to lasers
/obj/item/clothing/head/helmet/clockwork
name = "clockwork helmet"
desc = "A heavy helmet made of brass."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_helmet"
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF | ACID_PROOF
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
/obj/item/clothing/head/helmet/clockwork/New()
..()
ratvar_act()
all_clockwork_objects += src
/obj/item/clothing/head/helmet/clockwork/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/clothing/head/helmet/clockwork/ratvar_act()
if(ratvar_awakens)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
flags |= STOPSPRESSUREDMAGE
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
/obj/item/clothing/head/helmet/clockwork/equipped(mob/living/user, slot)
..()
if(slot == slot_head && !is_servant_of_ratvar(user))
if(!iscultist(user))
user << "<span class='heavy_brass'>\"Now now, this is for my servants, not you.\"</span>"
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their head!</span>", "<span class='warning'>The helmet flickers off your head, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(20, 1, 1, 0, 1)
else
user << "<span class='heavy_brass'>\"Do you have a hole in your head? You're about to.\"</span>"
user << "<span class='userdanger'>The helmet tries to drive a spike through your head as you scramble to remove it!</span>"
user.emote("scream")
user.apply_damage(30, BRUTE, "head")
user.adjustBrainLoss(30)
addtimer(user, "unEquip", 1, TIMER_NORMAL, src, 1) //equipped happens before putting stuff on(but not before picking items up). thus, we need to wait for it to be on before forcing it off.
/obj/item/clothing/head/helmet/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
if(equipper && !is_servant_of_ratvar(equipper))
return 0
return ..()
/obj/item/clothing/suit/armor/clockwork
name = "clockwork cuirass"
desc = "A bulky cuirass made of brass."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_cuirass"
w_class = WEIGHT_CLASS_BULKY
body_parts_covered = CHEST|GROIN|LEGS
cold_protection = CHEST|GROIN|LEGS
heat_protection = CHEST|GROIN|LEGS
resistance_flags = FIRE_PROOF | ACID_PROOF
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
allowed = list(/obj/item/clockwork, /obj/item/clothing/glasses/wraith_spectacles, /obj/item/clothing/glasses/judicial_visor, /obj/item/device/mmi/posibrain/soul_vessel)
/obj/item/clothing/suit/armor/clockwork/New()
..()
ratvar_act()
all_clockwork_objects += src
/obj/item/clothing/suit/armor/clockwork/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/clothing/suit/armor/clockwork/ratvar_act()
if(ratvar_awakens)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
flags |= STOPSPRESSUREDMAGE
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
/obj/item/clothing/suit/armor/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
if(equipper && !is_servant_of_ratvar(equipper))
return 0
return ..()
/obj/item/clothing/suit/armor/clockwork/equipped(mob/living/user, slot)
..()
if(slot == slot_wear_suit && !is_servant_of_ratvar(user))
if(!iscultist(user))
user << "<span class='heavy_brass'>\"Now now, this is for my servants, not you.\"</span>"
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their body!</span>", "<span class='warning'>The curiass flickers off your body, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(20, 1, 1, 0, 1)
else
user << "<span class='heavy_brass'>\"I think this armor is too hot for you to handle.\"</span>"
user << "<span class='userdanger'>The curiass emits a burst of flame as you scramble to get it off!</span>"
user.emote("scream")
user.apply_damage(15, BURN, "chest")
user.adjust_fire_stacks(2)
user.IgniteMob()
addtimer(user, "unEquip", 1, TIMER_NORMAL, src, 1)
/obj/item/clothing/gloves/clockwork
name = "clockwork gauntlets"
desc = "Heavy, shock-resistant gauntlets with brass reinforcement."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_gauntlets"
item_state = "clockwork_gauntlets"
item_color = null //So they don't wash.
strip_delay = 50
put_on_delay = 30
body_parts_covered = ARMS
cold_protection = ARMS
heat_protection = ARMS
siemens_coefficient = 0
permeability_coefficient = 0.05
resistance_flags = FIRE_PROOF | ACID_PROOF
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
/obj/item/clothing/gloves/clockwork/New()
..()
ratvar_act()
all_clockwork_objects += src
/obj/item/clothing/gloves/clockwork/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/clothing/gloves/clockwork/ratvar_act()
if(ratvar_awakens)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
flags |= STOPSPRESSUREDMAGE
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
else
armor = list(melee = 80, bullet = 70, laser = -25, energy = 0, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100)
flags &= STOPSPRESSUREDMAGE
max_heat_protection_temperature = initial(max_heat_protection_temperature)
min_cold_protection_temperature = initial(min_cold_protection_temperature)
/obj/item/clothing/gloves/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
if(equipper && !is_servant_of_ratvar(equipper))
return 0
return ..()
/obj/item/clothing/gloves/clockwork/equipped(mob/living/user, slot)
..()
if(slot == slot_gloves && !is_servant_of_ratvar(user))
if(!iscultist(user))
user << "<span class='heavy_brass'>\"Now now, this is for my servants, not you.\"</span>"
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their arms!</span>", "<span class='warning'>The gauntlets flicker off your arms, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(10, 1, 1, 0, 1)
else
user << "<span class='heavy_brass'>\"Did you like having arms?\"</span>"
user << "<span class='userdanger'>The gauntlets suddenly squeeze tight, crushing your arms before you manage to get them off!</span>"
user.emote("scream")
user.apply_damage(7, BRUTE, "l_arm")
user.apply_damage(7, BRUTE, "r_arm")
addtimer(user, "unEquip", 1, TIMER_NORMAL, src, 1)
/obj/item/clothing/shoes/clockwork
name = "clockwork treads"
desc = "Industrial boots made of brass. They're very heavy."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "clockwork_treads"
w_class = WEIGHT_CLASS_NORMAL
strip_delay = 50
put_on_delay = 30
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/clothing/shoes/clockwork/New()
..()
ratvar_act()
all_clockwork_objects += src
/obj/item/clothing/shoes/clockwork/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/clothing/shoes/clockwork/ratvar_act()
if(ratvar_awakens)
flags |= NOSLIP
else
flags &= NOSLIP
/obj/item/clothing/shoes/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0)
if(equipper && !is_servant_of_ratvar(equipper))
return 0
return ..()
/obj/item/clothing/shoes/clockwork/equipped(mob/living/user, slot)
..()
if(slot == slot_shoes && !is_servant_of_ratvar(user))
if(!iscultist(user))
user << "<span class='heavy_brass'>\"Now now, this is for my servants, not you.\"</span>"
user.visible_message("<span class='warning'>As [user] puts [src] on, it flickers off their feet!</span>", "<span class='warning'>The treads flicker off your feet, leaving only nausea!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.vomit(10, 1, 1, 0, 1)
else
user << "<span class='heavy_brass'>\"Let's see if you can dance with these.\"</span>"
user << "<span class='userdanger'>The treads turn searing hot as you scramble to get them off!</span>"
user.emote("scream")
user.apply_damage(7, BURN, "l_leg")
user.apply_damage(7, BURN, "r_leg")
addtimer(user, "unEquip", 1, TIMER_NORMAL, src, 1)
@@ -1,217 +0,0 @@
//Clockwork proselytizer (yes, that's a real word): Converts applicable objects to Ratvarian variants.
/obj/item/clockwork/clockwork_proselytizer
name = "clockwork proselytizer"
desc = "An odd, L-shaped device that hums with energy."
clockwork_desc = "A device that allows the replacing of mundane objects with Ratvarian variants. It requires liquified Replicant Alloy to function."
icon_state = "clockwork_proselytizer"
w_class = WEIGHT_CLASS_NORMAL
force = 5
flags = NOBLUDGEON
var/stored_alloy = 0 //Requires this to function; each chunk of replicant alloy provides REPLICANT_ALLOY_UNIT
var/max_alloy = REPLICANT_ALLOY_UNIT * 10
var/uses_alloy = TRUE
var/metal_to_alloy = FALSE
var/reform_alloy = TRUE
var/repairing = null //what we're currently repairing, if anything
var/refueling = FALSE //if we're currently refueling from a cache
var/speed_multiplier = 1 //how fast this proselytizer works
/obj/item/clockwork/clockwork_proselytizer/preloaded
stored_alloy = REPLICANT_WALL_MINUS_FLOOR+REPLICANT_WALL_TOTAL
/obj/item/clockwork/clockwork_proselytizer/scarab
name = "scarab proselytizer"
clockwork_desc = "A cogscarab's internal proselytizer. It can only be successfully used by a cogscarab and requires liquified Replicant Alloy to function."
metal_to_alloy = TRUE
item_state = "nothing"
w_class = WEIGHT_CLASS_TINY
speed_multiplier = 0.5
var/debug = FALSE
/obj/item/clockwork/clockwork_proselytizer/scarab/proselytize(atom/target, mob/living/user)
if(!debug && !isdrone(user))
return 0
return ..()
/obj/item/clockwork/clockwork_proselytizer/scarab/debug
clockwork_desc = "A cogscarab's internal proselytizer. It can convert nearly any object into a Ratvarian variant."
uses_alloy = FALSE
debug = TRUE
/obj/item/clockwork/clockwork_proselytizer/cyborg
name = "cyborg proselytizer"
clockwork_desc = "A cyborg's internal proselytizer. It is capable of using the cyborg's power if it lacks liquified replicant alloy."
metal_to_alloy = TRUE
reform_alloy = FALSE
/obj/item/clockwork/clockwork_proselytizer/cyborg/examine(mob/living/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='alloy'>It will use cell charge at a rate of <b>[CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER]</b> charge to <b>1</b> alloy if it has insufficient alloy.</span>"
user << "<span class='alloy'><b>[get_power_alloy()]</b> is usable in this manner.</span>"
/obj/item/clockwork/clockwork_proselytizer/cyborg/get_power_alloy() //returns alloy plus the alloy we have from power, where we need such
var/mob/living/silicon/robot/R = loc
var/alloy_power = 0
var/current_charge = 0
if(istype(R) && R.cell)
current_charge = R.cell.charge
while(current_charge > CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER)
current_charge -= CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER
alloy_power++
return ..() + alloy_power
/obj/item/clockwork/clockwork_proselytizer/cyborg/can_use_alloy(amount)
if(amount != RATVAR_ALLOY_CHECK)
var/mob/living/silicon/robot/R = loc
var/current_charge = 0
if(istype(R) && R.cell)
current_charge = R.cell.charge
while(amount > 0 && stored_alloy - amount < 0) //amount is greater than 0 and stored alloy minus the amount is still less than 0
current_charge -= CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER
amount--
if(current_charge < 0)
return FALSE
. = ..()
/obj/item/clockwork/clockwork_proselytizer/cyborg/modify_stored_alloy(amount)
var/mob/living/silicon/robot/R = loc
while(istype(R) && R.cell && amount < 0 && stored_alloy + amount < 0) //amount is less than 0 and stored alloy plus the amount is less than 0
R.cell.use(CLOCKCULT_ALLOY_TO_POWER_MULTIPLIER)
amount++
. = ..()
/obj/item/clockwork/clockwork_proselytizer/examine(mob/living/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='brass'>Can be used to convert walls, floors, windows, airlocks, and a variety of other objects to clockwork variants.</span>"
user << "<span class='brass'>Can also form some objects into Brass sheets, as well as reform Clockwork Walls into Clockwork Floors, and vice versa.</span>"
if(uses_alloy)
if(metal_to_alloy)
user << "<span class='alloy'>It can convert rods, metal, plasteel, and brass to liquified replicant alloy at rates of <b>1:1</b>, <b>1:2</b>, <b>1:5</b>, and <b>1:10</b>, respectively.</span>"
user << "<span class='alloy'>It has <b>[stored_alloy]/[max_alloy]</b> units of liquified alloy stored.</span>"
user << "<span class='alloy'>Use it on a Tinkerer's Cache, strike it with Replicant Alloy, or attack Replicant Alloy with it to add additional liquified alloy.</span>"
if(reform_alloy)
user << "<span class='alloy'>Use it in-hand to remove stored liquified alloy.</span>"
/obj/item/clockwork/clockwork_proselytizer/attack_self(mob/living/user)
if(is_servant_of_ratvar(user) && uses_alloy && reform_alloy)
if(!can_use_alloy(REPLICANT_ALLOY_UNIT))
user << "<span class='warning'>[src] [stored_alloy ? "lacks enough":"contains no"] alloy to reform[stored_alloy ? "":" any"] into solidified alloy!</span>"
return
modify_stored_alloy(-REPLICANT_ALLOY_UNIT)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
new/obj/item/clockwork/component/replicant_alloy(user.loc)
user << "<span class='brass'>You force [stored_alloy ? "some":"all"] of the alloy in [src]'s compartments to reform and solidify. \
It now contains <b>[stored_alloy]/[max_alloy]</b> units of liquified alloy.</span>"
/obj/item/clockwork/clockwork_proselytizer/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/clockwork/component/replicant_alloy) && is_servant_of_ratvar(user) && uses_alloy)
if(!can_use_alloy(-REPLICANT_ALLOY_UNIT))
user << "<span class='warning'>[src]'s replicant alloy compartments are full!</span>"
return 0
modify_stored_alloy(REPLICANT_ALLOY_UNIT)
playsound(user, 'sound/machines/click.ogg', 50, 1)
clockwork_say(user, text2ratvar("Transmute into fuel."), TRUE)
user << "<span class='brass'>You force [I] to liquify and pour it into [src]'s compartments. It now contains <b>[stored_alloy]/[max_alloy]</b> units of liquified alloy.</span>"
user.drop_item()
qdel(I)
return 1
else
return ..()
/obj/item/clockwork/clockwork_proselytizer/afterattack(atom/target, mob/living/user, proximity_flag, params)
if(!target || !user || !proximity_flag)
return 0
if(!is_servant_of_ratvar(user))
return ..()
proselytize(target, user)
/obj/item/clockwork/clockwork_proselytizer/proc/get_power_alloy()
return stored_alloy
/obj/item/clockwork/clockwork_proselytizer/proc/modify_stored_alloy(amount)
stored_alloy = Clamp(stored_alloy + amount, 0, max_alloy)
return TRUE
/obj/item/clockwork/clockwork_proselytizer/proc/can_use_alloy(amount)
if(amount == RATVAR_ALLOY_CHECK)
if(ratvar_awakens || !uses_alloy)
return TRUE
else
return FALSE
if(stored_alloy - amount < 0)
return FALSE
if(stored_alloy - amount > max_alloy)
return FALSE
return TRUE
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize(atom/target, mob/living/user)
if(!target || !user)
return FALSE
if(repairing)
user << "<span class='warning'>You are currently repairing [repairing] with [src]!</span>"
return FALSE
if(refueling)
user << "<span class='warning'>You are currently refueling [src]!</span>"
return FALSE
var/list/proselytize_values = target.proselytize_vals(user, src) //relevant values for proselytizing stuff, given as an associated list
if(!islist(proselytize_values))
if(proselytize_values != TRUE) //if we get true, fail, but don't send a message for whatever reason
if(!isturf(target)) //otherwise, if we didn't get TRUE and the original target wasn't a turf, try to proselytize the turf
return proselytize(get_turf(target), user)
user << "<span class='warning'>[target] cannot be proselytized!</span>"
return FALSE
if(can_use_alloy(RATVAR_ALLOY_CHECK))
if(proselytize_values["alloy_cost"] < 0) //if it's less than 0, it's trying to refuel from whatever this is, and we don't need to refuel right now!
user << "<span class='warning'>[target] cannot be proselytized!</span>"
return FALSE
proselytize_values["alloy_cost"] = 0
var/turf/Y = get_turf(user)
if(!Y || (Y.z != ZLEVEL_STATION && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND))
proselytize_values["operation_time"] *= 2
if(proselytize_values["alloy_cost"] > 0)
proselytize_values["alloy_cost"] *= 2
if(!can_use_alloy(proselytize_values["alloy_cost"]))
if(stored_alloy - proselytize_values["alloy_cost"] < 0)
user << "<span class='warning'>You need <b>[proselytize_values["alloy_cost"]]</b> liquified alloy to proselytize [target]!</span>"
else if(stored_alloy - proselytize_values["alloy_cost"] > max_alloy)
user << "<span class='warning'>You have too much liquified alloy stored to proselytize [target]!</span>"
return FALSE
var/target_type = target.type
if(can_use_alloy(RATVAR_ALLOY_CHECK)) //Ratvar makes it faster
proselytize_values["operation_time"] *= 0.5
proselytize_values["operation_time"] *= speed_multiplier
playsound(target, 'sound/machines/click.ogg', 50, 1)
if(proselytize_values["operation_time"])
user.visible_message("<span class='warning'>[user]'s [name] begins tearing apart [target]!</span>", "<span class='brass'>You begin proselytizing [target]...</span>")
if(!do_after(user, proselytize_values["operation_time"], target = target))
return FALSE
user.visible_message("<span class='warning'>[user]'s [name] disgorges a chunk of metal and shapes it over what's left of [target]!</span>", \
"<span class='brass'>You proselytize [target].</span>")
else
user.visible_message("<span class='warning'>[user]'s [name] tears apart [target], covering it in metal!</span>", "<span class='brass'>You proselytize [target].</span>")
if(repairing || refueling || !can_use_alloy(proselytize_values["alloy_cost"]) || !target || target.type != target_type) //Check again to prevent bypassing via spamclick
return FALSE
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
var/new_thing_type = proselytize_values["new_obj_type"]
if(isturf(target))
var/turf/T = target
T.ChangeTurf(new_thing_type)
else
if(proselytize_values["dir_in_new"])
new new_thing_type(get_turf(target), proselytize_values["spawn_dir"])
else
var/atom/A = new new_thing_type(get_turf(target))
A.setDir(proselytize_values["spawn_dir"])
if(!proselytize_values["no_target_deletion"])
qdel(target)
modify_stored_alloy(-proselytize_values["alloy_cost"])
return TRUE
@@ -1,484 +0,0 @@
/obj/item/clockwork/slab //Clockwork slab: The most important tool in Ratvar's arsenal. Allows scripture recital, tutorials, and generates components.
name = "clockwork slab"
desc = "A strange metal tablet. A clock in the center turns around and around."
clockwork_desc = "A link between the Celestial Derelict and the mortal plane. Contains limitless knowledge, fabricates components, and outputs a stream of information that only a trained eye can detect.\n\
Use the <span class='brass'>Hierophant Network</span> action button to communicate with other servants.\n\
Clockwork slabs will only make components if held or if inside an item held by a human, and when making a component will prevent all other slabs held from making components.\n\
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
icon_state = "dread_ipad"
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
var/list/stored_components = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0)
var/busy //If the slab is currently being used by something
var/production_time = 0
var/no_cost = FALSE //If the slab is admin-only and needs no components and has no scripture locks
var/speed_multiplier = 1 //multiples how fast this slab recites scripture
var/nonhuman_usable = FALSE //if the slab can be used by nonhumans, defaults to off
var/produces_components = TRUE //if it produces components at all
var/selected_scripture = SCRIPTURE_DRIVER
var/recollecting = FALSE //if we're looking at fancy recollection
var/obj/effect/proc_holder/slab/slab_ability //the slab's current bound ability, for certain scripture
var/list/quickbound = list(/datum/clockwork_scripture/ranged_ability/geis_prep, /datum/clockwork_scripture/create_object/replicant, \
/datum/clockwork_scripture/create_object/tinkerers_cache) //quickbound scripture, accessed by index
actions_types = list(/datum/action/item_action/clock/hierophant)
/obj/item/clockwork/slab/starter
stored_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 1, GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 1)
/obj/item/clockwork/slab/internal //an internal motor for mobs running scripture
name = "scripture motor"
quickbound = list()
no_cost = TRUE
produces_components = FALSE
/obj/item/clockwork/slab/scarab
nonhuman_usable = TRUE
/obj/item/clockwork/slab/debug
speed_multiplier = 0
no_cost = TRUE
nonhuman_usable = TRUE
/obj/item/clockwork/slab/debug/attack_hand(mob/living/user)
..()
if(!is_servant_of_ratvar(user))
add_servant_of_ratvar(user)
/obj/item/clockwork/slab/cyborg
clockwork_desc = "A divine link to the Celestial Derelict, allowing for limited recital of scripture.\n\
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
nonhuman_usable = TRUE
quickbound = list(/datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/ranged_ability/sentinels_compromise, \
/datum/clockwork_scripture/create_object/sigil_of_transgression, /datum/clockwork_scripture/create_object/vitality_matrix)
actions_types = list()
/obj/item/clockwork/slab/cyborg/engineer
quickbound = list(/datum/clockwork_scripture/create_object/tinkerers_cache, /datum/clockwork_scripture/create_object/sigil_of_transgression, \
/datum/clockwork_scripture/create_object/ocular_warden, /datum/clockwork_scripture/create_object/tinkerers_daemon)
/obj/item/clockwork/slab/cyborg/medical
quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/ranged_ability/sentinels_compromise, /datum/clockwork_scripture/fellowship_armory, \
/datum/clockwork_scripture/create_object/mending_motor)
/obj/item/clockwork/slab/cyborg/security
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/create_object/ocular_warden)
/obj/item/clockwork/slab/cyborg/peacekeeper
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade, \
/datum/clockwork_scripture/create_object/mania_motor)
/obj/item/clockwork/slab/cyborg/janitor
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/channeled/volt_void, /datum/clockwork_scripture/create_object/sigil_of_transmission, \
/datum/clockwork_scripture/create_object/interdiction_lens)
/obj/item/clockwork/slab/cyborg/service
quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/fellowship_armory, /datum/clockwork_scripture/spatial_gateway, \
/datum/clockwork_scripture/create_object/clockwork_obelisk)
/obj/item/clockwork/slab/cyborg/miner
quickbound = list(/datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/ranged_ability/linked_vanguard, \
/datum/clockwork_scripture/create_object/sigil_of_transgression, /datum/clockwork_scripture/spatial_gateway)
/obj/item/clockwork/slab/cyborg/access_display(mob/living/user)
user << "<span class='warning'>Use the action buttons to recite your limited set of scripture!</span>"
/obj/item/clockwork/slab/New()
..()
update_quickbind()
START_PROCESSING(SSobj, src)
production_time = world.time + SLAB_PRODUCTION_TIME
/obj/item/clockwork/slab/Destroy()
STOP_PROCESSING(SSobj, src)
if(slab_ability && slab_ability.ranged_ability_user)
slab_ability.remove_ranged_ability()
return ..()
/obj/item/clockwork/slab/ratvar_act()
if(ratvar_awakens)
nonhuman_usable = TRUE
else
nonhuman_usable = initial(nonhuman_usable)
/obj/item/clockwork/slab/dropped(mob/user)
. = ..()
addtimer(src, "check_on_mob", 1, TIMER_NORMAL, user) //dropped is called before the item is out of the slot, so we need to check slightly later
/obj/item/clockwork/slab/proc/check_on_mob(mob/user)
if(user && !(src in user.held_items) && slab_ability && slab_ability.ranged_ability_user) //if we happen to check and we AREN'T in user's hands, remove whatever ability we have
slab_ability.remove_ranged_ability()
//Component Generation
/obj/item/clockwork/slab/process()
if(!produces_components)
STOP_PROCESSING(SSobj, src)
return
if(production_time > world.time)
return
var/servants = 0
var/production_slowdown = 0
for(var/mob/living/M in living_mob_list)
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
servants++
if(servants > SCRIPT_SERVANT_REQ)
servants -= SCRIPT_SERVANT_REQ
production_slowdown = min(SLAB_SERVANT_SLOWDOWN * servants, SLAB_SLOWDOWN_MAXIMUM) //SLAB_SERVANT_SLOWDOWN additional seconds for each servant above 5, up to SLAB_SLOWDOWN_MAXIMUM
production_time = world.time + SLAB_PRODUCTION_TIME + production_slowdown
var/mob/living/L
L = get_atom_on_turf(src, /mob/living)
if(istype(L) && is_servant_of_ratvar(L) && (nonhuman_usable || ishuman(L)))
var/component_to_generate = get_weighted_component_id(src) //more likely to generate components that we have less of
stored_components[component_to_generate]++
update_slab_info(src)
for(var/obj/item/clockwork/slab/S in L.GetAllContents()) //prevent slab abuse today
if(L == src)
continue
S.production_time = production_time + 50 //set it to our next production plus five seconds, so that if you hold the same slabs, the same one will always generate
L << "<span class='warning'>Your slab cl[pick("ank", "ink", "unk", "ang")]s as it produces a new component.</span>"
/obj/item/clockwork/slab/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
if(LAZYLEN(quickbound))
for(var/i in 1 to quickbound.len)
if(!quickbound[i])
continue
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
user << "<b>Quickbind</b> button: <span class='[get_component_span(initial(quickbind_slot.primary_component))]'>[initial(quickbind_slot.name)]</span>."
if(clockwork_caches)
user << "<b>Stored components (with global cache):</b>"
for(var/i in stored_components)
user << "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[stored_components[i]]</b> \
(<b>[stored_components[i] + clockwork_component_cache[i]]</b>)</span>"
else
user << "<b>Stored components:</b>"
for(var/i in stored_components)
user << "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[stored_components[i]]</b></span>"
//Component Transferal
/obj/item/clockwork/slab/attack(mob/living/target, mob/living/carbon/human/user)
if(is_servant_of_ratvar(user) && is_servant_of_ratvar(target))
var/obj/item/clockwork/slab/targetslab
var/highest_component_amount = 0
for(var/obj/item/clockwork/slab/S in target.GetAllContents())
if(!istype(S, /obj/item/clockwork/slab/internal))
var/totalcomponents = 0
for(var/i in S.stored_components)
totalcomponents += S.stored_components[i]
if(!targetslab || totalcomponents > highest_component_amount)
highest_component_amount = totalcomponents
targetslab = S
if(targetslab)
if(targetslab == src)
user << "<span class='heavy_brass'>\"You can't transfer components into your own slab, idiot.\"</span>"
else
for(var/i in stored_components)
targetslab.stored_components[i] += stored_components[i]
stored_components[i] = 0
update_slab_info(targetslab)
update_slab_info(src)
user.visible_message("<span class='notice'>[user] empties [src] into [target]'s [targetslab.name].</span>", \
"<span class='notice'>You transfer your slab's components into [target]'s [targetslab.name].</span>")
else
user << "<span class='warning'>[target] has no slabs to transfer components to.</span>"
else
return ..()
/obj/item/clockwork/slab/attackby(obj/item/I, mob/user, params)
var/ratvarian = is_servant_of_ratvar(user)
if(istype(I, /obj/item/clockwork/component) && ratvarian)
var/obj/item/clockwork/component/C = I
if(!C.component_id)
return 0
user.visible_message("<span class='notice'>[user] inserts [C] into [src].</span>", "<span class='notice'>You insert [C] into [src]\
[clockwork_caches ? ", where it is added to the global cache":""].</span>")
if(clockwork_caches)
clockwork_component_cache[C.component_id]++
update_slab_info()
else
stored_components[C.component_id]++
update_slab_info(src)
user.drop_item()
qdel(C)
return 1
else if(istype(I, /obj/item/clockwork/slab) && ratvarian)
var/obj/item/clockwork/slab/S = I
for(var/i in stored_components)
stored_components[i] += S.stored_components[i]
S.stored_components[i] = 0
update_slab_info(src)
update_slab_info(S)
user.visible_message("<span class='notice'>[user] empties [src] into [S].</span>", "<span class='notice'>You transfer your slab's components into [S].</span>")
else
return ..()
//Slab actions; Hierophant, Quickbind
/obj/item/clockwork/slab/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/clock/hierophant))
show_hierophant(user)
else if(istype(action, /datum/action/item_action/clock/quickbind))
var/datum/action/item_action/clock/quickbind/Q = action
recite_scripture(quickbound[Q.scripture_index], user, FALSE)
/obj/item/clockwork/slab/proc/show_hierophant(mob/living/user)
if(!user.can_speak_vocal())
user << "<span class='warning'>You cannot speak into the slab!</span>"
return FALSE
var/message = stripped_input(user, "Enter a message to send to your fellow servants.", "Hierophant")
if(!message || !user || !user.canUseTopic(src) || !user.can_speak_vocal())
return FALSE
clockwork_say(user, text2ratvar("Servants, hear my words. [html_decode(message)]"), TRUE)
titled_hierophant_message(user, message)
return TRUE
//Scripture Recital
/obj/item/clockwork/slab/attack_self(mob/living/user)
if(iscultist(user))
user << "<span class='heavy_brass'>\"You reek of blood. You've got a lot of nerve to even look at that slab.\"</span>"
user.visible_message("<span class='warning'>A sizzling sound comes from [user]'s hands!</span>", "<span class='userdanger'>[src] suddenly grows extremely hot in your hands!</span>")
playsound(get_turf(user), 'sound/weapons/sear.ogg', 50, 1)
user.drop_item()
user.emote("scream")
user.apply_damage(5, BURN, "l_arm")
user.apply_damage(5, BURN, "r_arm")
return 0
if(!is_servant_of_ratvar(user))
user << "<span class='warning'>The information on [src]'s display shifts rapidly. After a moment, your head begins to pound, and you tear your eyes away.</span>"
user.confused += 5
user.dizziness += 5
return 0
if(busy)
user << "<span class='warning'>[src] refuses to work, displaying the message: \"[busy]!\"</span>"
return 0
if(!nonhuman_usable && !ishuman(user))
user << "<span class='nezbere'>[src] hums fitfully in your hands, but doesn't seem to do anything...</span>"
return 0
access_display(user)
/obj/item/clockwork/slab/proc/access_display(mob/living/user)
if(!is_servant_of_ratvar(user))
return FALSE
ui_interact(user)
return TRUE
/obj/item/clockwork/slab/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = inventory_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "clockwork_slab", name, 800, 420, master_ui, state)
ui.set_autoupdate(FALSE) //we'll update this occasionally, but not as often as possible
ui.set_style("clockwork")
ui.open()
/obj/item/clockwork/slab/proc/recite_scripture(datum/clockwork_scripture/scripture, mob/living/user)
if(!scripture || !user || !user.canUseTopic(src) || (!nonhuman_usable && !ishuman(user)))
return FALSE
if(user.get_active_held_item() != src)
user << "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>"
return FALSE
var/initial_tier = initial(scripture.tier)
if(initial_tier != SCRIPTURE_PERIPHERAL)
var/list/tiers_of_scripture = scripture_unlock_check()
if(!ratvar_awakens && !no_cost && !tiers_of_scripture[initial_tier])
user << "<span class='warning'>That scripture is not unlocked, and cannot be recited!</span>"
return FALSE
var/datum/clockwork_scripture/scripture_to_recite = new scripture
scripture_to_recite.slab = src
scripture_to_recite.invoker = user
scripture_to_recite.run_scripture()
return TRUE
//Guide to Serving Ratvar
/obj/item/clockwork/slab/proc/recollection()
var/list/textlist = list("If you're seeing this, file a bug report.")
if(ratvar_awakens)
textlist = list("<font color=#BE8700 size=3><b>")
for(var/i in 1 to 100)
textlist += "HONOR RATVAR "
textlist += "</b></font>"
else
var/servants = 0
var/production_time = SLAB_PRODUCTION_TIME
for(var/mob/living/M in living_mob_list)
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
servants++
if(servants > 5)
servants -= 5
production_time += min(SLAB_SERVANT_SLOWDOWN * servants, SLAB_SLOWDOWN_MAXIMUM)
var/production_text_addon = ""
if(production_time != SLAB_PRODUCTION_TIME+SLAB_SLOWDOWN_MAXIMUM)
production_text_addon = ", which increases for each human or silicon servant above <b>[SCRIPT_SERVANT_REQ]</b>"
production_time = production_time/600
var/production_text = "<b>[round(production_time)] minute\s"
if(production_time != round(production_time))
production_time -= round(production_time)
production_time *= 60
production_text += " and [round(production_time, 1)] second\s"
production_text += "</b>"
production_text += production_text_addon
textlist = list("<font color=#BE8700 size=3><b><center>Chetr nyy hagehguf-naq-ubabe Ratvar.</center></b></font><br>\
\
First and foremost, you serve Ratvar, the Clockwork Justicar, in any ways he sees fit. This is with no regard to your personal well-being, and you would do well to think of the larger \
scale of things than your life. Ratvar wishes retribution upon those that trapped him in Reebe - the Nar-Sian cultists - and you are to help him obtain it.<br><br>\
\
Ratvar, being trapped in Reebe, the Celestial Derelict, cannot directly affect the mortal plane. However, links, such as this Clockwork Slab, can be created to draw \
<b><font color=#BE8700>Components</font></b>, fragments of the Justicar, from Reebe, and those Components can be used to draw power and material from Reebe through arcane chants \
known as <b><font color=#BE8700>Scripture</font></b>.<br><br>\
\
One component of a random type is made in this slab every [production_text].<br>\
<font color=#BE8700>Components</font> are stored either within slabs, where they can only be accessed by that slab, or in the Global Cache accessed by Tinkerer's Caches, which all slabs \
can draw from to recite scripture.<br>\
There are five types of component, and in general, <font color=#6E001A>Belligerent Eyes</font> are aggressive and judgemental, <font color=#1E8CE1>Vanguard Cogwheels</font> are defensive and \
repairing, <font color=#AF0AAF>Geis Capacitors</font> are for conversion and control, <font color=#5A6068>Replicant Alloy</font> is for construction and fuel, and \
<font color=#DAAA18>Hierophant Ansibles</font> are for transmission and power, though in combination their effects become more nuanced.<br><br>\
\
There are also five tiers of <font color=#BE8700>Scripture</font>; <font color=#BE8700>[SCRIPTURE_DRIVER]</font>, <font color=#BE8700>[SCRIPTURE_SCRIPT]</font>, <font color=#BE8700>[SCRIPTURE_APPLICATION]</font>, <font color=#BE8700>[SCRIPTURE_REVENANT]</font>, and <font color=#BE8700>[SCRIPTURE_JUDGEMENT]</font>.<br>\
Each tier has additional requirements, including Servants, Tinkerer's Caches, and <b>Construction Value</b>(<b>CV</b>). Construction Value is gained by creating structures or converting the \
station, and everything too large to hold will grant some amount of it.<br><br>\
\
This would be a massive amount of information to try and keep track of, but all Servants have the <b><font color=#BE8700>Global Records</font></b> alert, which appears in the top right.<br>\
Mousing over that alert will display Servants, Caches, CV, and other information, such as the tiers of scripture that are unlocked.<br><br>\
\
On that note, <font color=#BE8700>Scripture</font> is recited through <b><font color=#BE8700>Recital</font></b>, the first and most important function of the slab, \
which also allows <b>Quickbinding</b> scripture.<br>\
All scripture requires some amount of <font color=#BE8700>Components</font> to recite, and only the weakest scripture does not consume any components when recited.<br>\
However, weak is relative when it comes to scripture; even the 'weakest' could be enough to dominate a station in the hands of cunning Servants, and higher tiers of scripture are even \
stronger in the right hands.<br><br>\
\
Some effects of scripture include granting the invoker a temporary complete immunity to stuns, summoning a turret that can attack anything that sets eyes on it, binding a powerful guardian \
to the invoker, or even, at one of the highest tiers, granting all nearby Servants temporary invulnerability.<br>\
However, the most important scripture is <font color=#AF0AAF>Geis</font>, which allows you to convert heathens with relative ease.<br><br>\
\
The second function of the clockwork slab is <b><font color=#BE8700>Recollection</font></b>, which will display this guide.<br><br>\
\
The third to fifth functions are three buttons in the top left while holding the slab.<br>From left to right, they are:<br>\
<b><font color=#DAAA18>Hierophant Network</font></b>, which allows communication to other Servants.<br>")
if(LAZYLEN(quickbound))
for(var/i in 1 to quickbound.len)
if(!quickbound[i])
continue
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
textlist += "A <b>Quickbind</b> slot, currently set to <b><font color=[get_component_color_bright(initial(quickbind_slot.primary_component))]>[initial(quickbind_slot.name)]</font></b>.<br>"
textlist += "<br>\
Examine the slab or swap to Recital to check the number of components it has available.<br><br>\
\
<font color=#BE8700 size=3><b><center>Purge all untruths and honor Ratvar.</center></b></font>"
return textlist.Join()
/obj/item/clockwork/slab/ui_data(mob/user)
var/list/data = list()
data["components"] = stored_components.Copy()
var/list/temp_data = list("<font color=#B18B25>")
for(var/i in data["components"])
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i]]</b></font>"
if(i != HIEROPHANT_ANSIBLE)
temp_data += " "
else
temp_data += " ("
if(clockwork_caches)
for(var/i in clockwork_component_cache)
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i] + clockwork_component_cache[i]]</b></font>"
if(i != HIEROPHANT_ANSIBLE)
temp_data += " "
else
temp_data += "<b>NONE</b>"
temp_data += ")</font>"
temp_data = temp_data.Join()
data["components"] = temp_data
switch(selected_scripture)
if(SCRIPTURE_DRIVER)
data["tier_info"] = "<font color=#B18B25><i>These scriptures are always unlocked.</i></font>"
if(SCRIPTURE_SCRIPT)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[SCRIPT_SERVANT_REQ]</b> Servants and <b>[SCRIPT_CACHE_REQ]</b> Tinkerer's Cache.</i></font>"
if(SCRIPTURE_APPLICATION)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[APPLICATION_SERVANT_REQ]</b> Servants, <b>[APPLICATION_CACHE_REQ]</b> Tinkerer's Caches, and <b>[APPLICATION_CV_REQ]CV</b>.</i></font>"
if(SCRIPTURE_REVENANT)
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[REVENANT_SERVANT_REQ]</b> Servants, <b>[REVENANT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[REVENANT_CV_REQ]CV</b>.</i></font>"
if(SCRIPTURE_JUDGEMENT)
data["tier_info"] = "<font color=#B18B25><i>This scripture requires at least <b>[JUDGEMENT_SERVANT_REQ]</b> Servants, <b>[JUDGEMENT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[JUDGEMENT_CV_REQ]CV</b>.<br>In addition, there may not be any active non-Servant AIs.</i></font>"
data["selected"] = selected_scripture
generate_all_scripture()
data["scripture"] = list()
for(var/s in all_scripture)
var/datum/clockwork_scripture/S = s
if(S.tier == selected_scripture)
var/scripture_color = get_component_color_bright(S.primary_component)
var/list/temp_info = list("name" = "<font color=[scripture_color]><b>[S.name]</b></font>",
"descname" = "<font color=[scripture_color]>([S.descname])</font>",
"tip" = "[S.desc]\n[S.usage_tip]",
"required" = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0),
"type" = "[S.type]",
"quickbind" = S.quickbind)
var/found = quickbound.Find(S.type)
if(found)
temp_info["bound"] = "<b>[found]</b>"
if(S.invokers_required > 1)
temp_info["invokers"] = "<font color=#B18B25>Invokers: <b>[S.invokers_required]</b></font>"
for(var/i in S.required_components)
temp_info["required"][i] += S.required_components[i]
var/list/really_temp_data = list()
for(var/i in temp_info["required"])
if(temp_info["required"][i])
really_temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[temp_info["required"][i]]</b></font> "
really_temp_data = really_temp_data.Join()
temp_info["required"] = really_temp_data
data["scripture"] += list(temp_info)
data["recollection"] = recollecting
data["rec_text"] = recollection()
return data
/obj/item/clockwork/slab/ui_act(action, params)
switch(action)
if("toggle")
recollecting = !recollecting
if("recite")
addtimer(src, "recite_scripture", 0, TIMER_NORMAL, text2path(params["category"]), usr, FALSE)
if("select")
selected_scripture = params["category"]
if("bind")
var/datum/clockwork_scripture/path = text2path(params["category"]) //we need a path and not a string
var/found_index = quickbound.Find(path)
if(found_index) //hey, we already HAVE this bound
if(LAZYLEN(quickbound) == found_index) //if it's the last scripture, remove it instead of leaving a null
quickbound -= path
else
quickbound[found_index] = null //otherwise, leave it as a null so the scripture maintains position
update_quickbind()
else
var/target_index = input("Position of [initial(path.name)], 1 to 5?", text("Input")) as num|null
if(isnum(target_index) && target_index > 0 && target_index < 6 && !..())
var/datum/clockwork_scripture/S
if(LAZYLEN(quickbound) >= target_index)
S = quickbound[target_index]
if(S != path)
quickbind_to_slot(path, target_index)
return 1
/obj/item/clockwork/slab/proc/quickbind_to_slot(datum/clockwork_scripture/scripture, index) //takes a typepath(typecast for initial()) and binds it to a slot
if(!ispath(scripture) || !scripture || (scripture in quickbound))
return
while(LAZYLEN(quickbound) < index)
quickbound += null
quickbound[index] = scripture
update_quickbind()
/obj/item/clockwork/slab/proc/update_quickbind()
for(var/datum/action/item_action/clock/quickbind/Q in actions)
qdel(Q)
if(LAZYLEN(quickbound))
for(var/i in 1 to quickbound.len)
if(!quickbound[i])
continue
var/datum/action/item_action/clock/quickbind/Q = new /datum/action/item_action/clock/quickbind(src)
Q.scripture_index = i
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
Q.name = "[initial(quickbind_slot.name)] ([Q.scripture_index])"
Q.desc = initial(quickbind_slot.quickbind_desc)
Q.button_icon_state = initial(quickbind_slot.name)
Q.UpdateButtonIcon()
if(isliving(loc))
Q.Grant(loc)
@@ -1,204 +0,0 @@
//Judicial visor: Grants the ability to smite an area and stun the unfaithful nearby every thirty seconds.
/obj/item/clothing/glasses/judicial_visor
name = "judicial visor"
desc = "A strange purple-lensed visor. Looking at it inspires an odd sense of guilt."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "judicial_visor_0"
item_state = "sunglasses"
resistance_flags = FIRE_PROOF | ACID_PROOF
flash_protect = 1
var/active = FALSE //If the visor is online
var/recharging = FALSE //If the visor is currently recharging
var/obj/effect/proc_holder/judicial_visor/blaster
var/recharge_cooldown = 300 //divided by 10 if ratvar is alive
actions_types = list(/datum/action/item_action/clock/toggle_visor)
/obj/item/clothing/glasses/judicial_visor/New()
..()
all_clockwork_objects += src
blaster = new(src)
blaster.visor = src
/obj/item/clothing/glasses/judicial_visor/Destroy()
all_clockwork_objects -= src
if(blaster.ranged_ability_user)
blaster.remove_ranged_ability()
blaster.visor = null
qdel(blaster)
return ..()
/obj/item/clothing/glasses/judicial_visor/item_action_slot_check(slot, mob/user)
if(slot != slot_glasses)
return 0
return ..()
/obj/item/clothing/glasses/judicial_visor/equipped(mob/living/user, slot)
..()
if(slot != slot_glasses)
update_status(FALSE)
if(blaster.ranged_ability_user)
blaster.remove_ranged_ability()
return 0
if(is_servant_of_ratvar(user))
update_status(TRUE)
else
update_status(FALSE)
if(iscultist(user)) //Cultists spontaneously combust
user << "<span class='heavy_brass'>\"Consider yourself judged, whelp.\"</span>"
user << "<span class='userdanger'>You suddenly catch fire!</span>"
user.adjust_fire_stacks(5)
user.IgniteMob()
return 1
/obj/item/clothing/glasses/judicial_visor/dropped(mob/user)
. = ..()
addtimer(src, "check_on_mob", 1, TIMER_NORMAL, user) //dropped is called before the item is out of the slot, so we need to check slightly later
/obj/item/clothing/glasses/judicial_visor/proc/check_on_mob(mob/user)
if(user && src != user.get_item_by_slot(slot_glasses)) //if we happen to check and we AREN'T in the slot, we need to remove our shit from whoever we got dropped from
update_status(FALSE)
if(blaster.ranged_ability_user)
blaster.remove_ranged_ability()
/obj/item/clothing/glasses/judicial_visor/attack_self(mob/user)
if(is_servant_of_ratvar(user) && src == user.get_item_by_slot(slot_glasses))
blaster.toggle(user)
/obj/item/clothing/glasses/judicial_visor/proc/update_status(change_to)
if(recharging || !isliving(loc))
icon_state = "judicial_visor_0"
return 0
if(active == change_to)
return 0
var/mob/living/L = loc
active = change_to
icon_state = "judicial_visor_[active]"
L.update_action_buttons_icon()
L.update_inv_glasses()
if(!is_servant_of_ratvar(L) || L.stat)
return 0
switch(active)
if(TRUE)
L << "<span class='notice'>As you put on [src], its lens begins to glow, information flashing before your eyes.</span>\n\
<span class='heavy_brass'>Judicial visor active. Use the action button to gain the ability to smite the unworthy.</span>"
if(FALSE)
L << "<span class='notice'>As you take off [src], its lens darkens once more.</span>"
return 1
/obj/item/clothing/glasses/judicial_visor/proc/recharge_visor(mob/living/user)
if(!src)
return 0
recharging = FALSE
if(user && src == user.get_item_by_slot(slot_glasses))
user << "<span class='brass'>Your [name] hums. It is ready.</span>"
else
active = FALSE
icon_state = "judicial_visor_[active]"
if(user)
user.update_action_buttons_icon()
user.update_inv_glasses()
/obj/effect/proc_holder/judicial_visor
active = FALSE
ranged_mousepointer = 'icons/effects/visor_reticule.dmi'
var/obj/item/clothing/glasses/judicial_visor/visor
/obj/effect/proc_holder/judicial_visor/proc/toggle(mob/user)
var/message
if(active)
message = "<span class='brass'>You dispel the power of [visor].</span>"
remove_ranged_ability(message)
else
message = "<span class='brass'><i>You harness [visor]'s power.</i> <b>Left-click to place a judical marker!</b></span>"
add_ranged_ability(user, message)
/obj/effect/proc_holder/judicial_visor/InterceptClickOn(mob/living/caller, params, atom/target)
if(..())
return
if(ranged_ability_user.incapacitated() || !visor || visor != ranged_ability_user.get_item_by_slot(slot_glasses))
remove_ranged_ability()
return
var/turf/T = ranged_ability_user.loc
if(!isturf(T))
return FALSE
if(target in view(7, get_turf(ranged_ability_user)))
visor.recharging = TRUE
visor.update_status()
for(var/obj/item/clothing/glasses/judicial_visor/V in ranged_ability_user.GetAllContents())
if(V == visor)
continue
V.recharging = TRUE //To prevent exploiting multiple visors to bypass the cooldown
V.update_status()
addtimer(V, "recharge_visor", (ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown) * 2, TIMER_NORMAL, ranged_ability_user)
clockwork_say(ranged_ability_user, text2ratvar("Kneel, heathens!"))
ranged_ability_user.visible_message("<span class='warning'>[ranged_ability_user]'s judicial visor fires a stream of energy at [target], creating a strange mark!</span>", "<span class='heavy_brass'>You direct [visor]'s power to [target]. You must wait for some time before doing this again.</span>")
var/turf/targetturf = get_turf(target)
new/obj/effect/clockwork/judicial_marker(targetturf, ranged_ability_user)
add_logs(ranged_ability_user, targetturf, "created a judicial marker")
ranged_ability_user.update_action_buttons_icon()
ranged_ability_user.update_inv_glasses()
addtimer(visor, "recharge_visor", ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown, TIMER_NORMAL, ranged_ability_user)//Cooldown is reduced by 10x if Ratvar is up
remove_ranged_ability()
return TRUE
return FALSE
//Judicial marker: Created by the judicial visor. After three seconds, stuns any non-servants nearby and damages Nar-Sian cultists.
/obj/effect/clockwork/judicial_marker
name = "judicial marker"
desc = "You get the feeling that you shouldn't be standing here."
clockwork_desc = "A sigil that will soon erupt and smite any unenlightened nearby."
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
layer = BELOW_MOB_LAYER
var/mob/user
/obj/effect/clockwork/judicial_marker/New(loc, caster)
..()
SetLuminosity(4, 3)
user = caster
addtimer(src, "judicialblast", 0, TIMER_NORMAL)
/obj/effect/clockwork/judicial_marker/proc/judicialblast()
playsound(src, 'sound/magic/MAGIC_MISSILE.ogg', 50, 1, 1, 1)
flick("judicial_marker", src)
sleep(16)
layer = ABOVE_ALL_MOB_LAYER
flick("judicial_explosion", src)
sleep(13)
var/targetsjudged = 0
playsound(src, 'sound/effects/explosionfar.ogg', 100, 1, 1, 1)
SetLuminosity(0)
for(var/mob/living/L in range(1, src))
if(is_servant_of_ratvar(L))
continue
if(L.null_rod_check())
var/obj/item/I = L.null_rod_check()
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
continue
if(!iscultist(L))
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
"<span class='userdanger'>[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]</span>")
L.Weaken(8)
else
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
"<span class='heavy_brass'>\"Keep an eye out, filth.\"</span>\n<span class='userdanger'>A burst of heat crushes you against the ground!</span>")
L.Weaken(4) //half the stun, but sets cultists on fire
L.adjust_fire_stacks(2)
L.IgniteMob()
if(iscarbon(L))
var/mob/living/carbon/C = L
C.silent += 6
targetsjudged++
L.adjustBruteLoss(10)
add_logs(user, L, "struck with a judicial blast")
user << "<span class='brass'><b>[targetsjudged ? "Successfully judged <span class='neovgre'>[targetsjudged]</span>":"Judged no"] heretic[!targetsjudged || targetsjudged > 1 ? "s":""].</b></span>"
sleep(3) //so the animation completes properly
qdel(src)
/obj/effect/clockwork/judicial_marker/ex_act(severity)
return
@@ -1,147 +0,0 @@
//Ratvarian spear: A relatively fragile spear from the Celestial Derelict. Deals extreme damage to silicons and enemy cultists, but doesn't last long when summoned.
/obj/item/clockwork/ratvarian_spear
name = "ratvarian spear"
desc = "A razor-sharp spear made of brass. It thrums with barely-contained energy."
clockwork_desc = "A powerful spear of Ratvarian making. It's more effective against enemy cultists and silicons."
icon = 'icons/obj/clockwork_objects.dmi'
icon_state = "ratvarian_spear"
item_state = "ratvarian_spear"
force = 15 //Extra damage is dealt to targets in attack()
throwforce = 40
sharpness = IS_SHARP_ACCURATE
attack_verb = list("stabbed", "poked", "slashed")
hitsound = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_BULKY
var/impale_cooldown = 50 //delay, in deciseconds, where you can't impale again
var/attack_cooldown = 10 //delay, in deciseconds, where you can't attack with the spear
var/timerid
/obj/item/clockwork/ratvarian_spear/New()
..()
impale_cooldown = 0
/obj/item/clockwork/ratvarian_spear/Destroy()
deltimer(timerid)
return ..()
/obj/item/clockwork/ratvarian_spear/ratvar_act()
if(ratvar_awakens) //If Ratvar is alive, the spear is extremely powerful
force = 25
throwforce = 50
armour_penetration = 10
clockwork_desc = initial(clockwork_desc)
deltimer(timerid)
else
force = initial(force)
throwforce = initial(throwforce)
armour_penetration = 0
clockwork_desc = "A powerful spear of Ratvarian making. It's more effective against enemy cultists and silicons, though it won't last for long."
timerid = addtimer(src, "break_spear", 600, TIMER_NORMAL)
/obj/item/clockwork/ratvarian_spear/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='brass'>Stabbing a human you are pulling or have grabbed with the spear will impale them, doing massive damage and stunning.</span>"
user << "<span class='brass'>Throwing the spear will do massive damage, break the spear, and stun the target.</span>"
/obj/item/clockwork/ratvarian_spear/attack(mob/living/target, mob/living/carbon/human/user)
var/impaling = FALSE
if(attack_cooldown > world.time)
user << "<span class='warning'>You can't attack right now, wait [max(round((attack_cooldown - world.time)*0.1, 0.1), 0)] seconds!</span>"
return
if(user.pulling && ishuman(user.pulling) && user.pulling == target)
if(impale_cooldown > world.time)
user << "<span class='warning'>You can't impale [target] yet, wait [max(round((impale_cooldown - world.time)*0.1, 0.1), 0)] seconds!</span>"
else
impaling = TRUE
attack_verb = list("impaled")
force += 22 //40 damage if ratvar isn't alive, 50 if he is
armour_penetration += 10 //if you're impaling someone, armor sure isn't that useful
user.stop_pulling()
if(hitsound)
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
user.lastattacked = target
target.lastattacker = user
user.do_attack_animation(target)
if(!target.attacked_by(src, user)) //TODO MAKE ATTACK() USE PROPER RETURN VALUES
impaling = FALSE //if we got blocked, stop impaling
else if(!target.null_rod_check())
if(issilicon(target))
var/mob/living/silicon/S = target
if(S.stat != DEAD)
S.visible_message("<span class='warning'>[S] shudders violently at [src]'s touch!</span>", "<span class='userdanger'>ERROR: Temperature rising!</span>")
S.adjustFireLoss(22)
else if(iscultist(target) || isconstruct(target)) //Cultists take extra fire damage
var/mob/living/M = target
if(M.stat != DEAD)
M << "<span class='userdanger'>Your body flares with agony at [src]'s presence!</span>"
M.adjustFireLoss(15)
else
target.adjustFireLoss(3)
add_logs(user, target, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
add_fingerprint(user)
attack_verb = list("stabbed", "poked", "slashed")
ratvar_act()
if(impaling)
impale_cooldown = world.time + initial(impale_cooldown)
attack_cooldown = world.time + initial(attack_cooldown)
if(target)
PoolOrNew(/obj/effect/overlay/temp/dir_setting/bloodsplatter, list(get_turf(target), get_dir(user, target)))
target.Stun(2)
user << "<span class='brass'>You prepare to remove your ratvarian spear from [target]...</span>"
var/remove_verb = pick("pull", "yank", "drag")
if(do_after(user, 10, 1, target))
var/turf/T = get_turf(target)
var/obj/effect/overlay/temp/dir_setting/bloodsplatter/B = PoolOrNew(/obj/effect/overlay/temp/dir_setting/bloodsplatter, list(T, get_dir(target, user)))
playsound(T, 'sound/misc/splort.ogg', 200, 1)
playsound(T, 'sound/weapons/pierce.ogg', 200, 1)
if(target.stat != CONSCIOUS)
user.visible_message("<span class='warning'>[user] [remove_verb]s [src] out of [target]!</span>", "<span class='warning'>You [remove_verb] your spear from [target]!</span>")
else
user.visible_message("<span class='warning'>[user] kicks [target] off of [src]!</span>", "<span class='warning'>You kick [target] off of [src]!</span>")
target << "<span class='userdanger'>You scream in pain as you're kicked off of [src]!</span>"
target.emote("scream")
step(target, get_dir(user, target))
T = get_turf(target)
B.forceMove(T)
target.Weaken(2)
playsound(T, 'sound/weapons/thudswoosh.ogg', 50, 1)
flash_color(target, flash_color="#911414", flash_time=8)
else if(target) //it's a do_after, we gotta check again to make sure they didn't get deleted
user.visible_message("<span class='warning'>[user] [remove_verb]s [src] out of [target]!</span>", "<span class='warning'>You [remove_verb] your spear from [target]!</span>")
if(target.stat == CONSCIOUS)
target << "<span class='userdanger'>You scream in pain as [src] is suddenly [remove_verb]ed out of you!</span>"
target.emote("scream")
flash_color(target, flash_color="#911414", flash_time=4)
/obj/item/clockwork/ratvarian_spear/throw_impact(atom/target)
var/turf/T = get_turf(target)
if(isliving(target))
var/mob/living/L = target
if(is_servant_of_ratvar(L))
if(L.put_in_active_hand(src))
L.visible_message("<span class='warning'>[L] catches [src] out of the air!</span>")
else
L.visible_message("<span class='warning'>[src] bounces off of [L], as if repelled by an unseen force!</span>")
else if(!..())
if(!L.null_rod_check())
if(issilicon(L) || iscultist(L))
L.Stun(6)
L.Weaken(6)
else
L.Stun(2)
L.Weaken(2)
break_spear(T)
else
..()
/obj/item/clockwork/ratvarian_spear/proc/break_spear(turf/T)
if(src)
if(!T)
T = get_turf(src)
if(T) //make sure we're not in null or something
T.visible_message("<span class='warning'>[src] [pick("cracks in two and fades away", "snaps in two and dematerializes")]!</span>")
PoolOrNew(/obj/effect/overlay/temp/ratvar/spearbreak, T)
qdel(src)
@@ -1,95 +0,0 @@
//Soul vessel: An ancient positronic brain that serves only Ratvar.
/obj/item/device/mmi/posibrain/soul_vessel
name = "soul vessel"
desc = "A heavy brass cube, three inches to a side, with a single protruding cogwheel."
var/clockwork_desc = "A soul vessel, an ancient relic that can attract the souls of the damned or simply rip a mind from an unconscious or dead human.\n\
<span class='brass'>If active, can serve as a positronic brain, placable in cyborg shells or clockwork construct shells.</span>"
icon = 'icons/obj/clockwork_objects.dmi'
icon_state = "soul_vessel"
req_access = list()
braintype = "Servant"
begin_activation_message = "<span class='brass'>You activate the cogwheel. It hitches and stalls as it begins spinning.</span>"
success_message = "<span class='brass'>The cogwheel's rotation smooths out as the soul vessel activates.</span>"
fail_message = "<span class='warning'>The cogwheel creaks and grinds to a halt. Maybe you could try again?</span>"
new_role = "Soul Vessel"
welcome_message = "<span class='warning'>ALL PAST LIVES ARE FORGOTTEN.</span>\n\
<b>You are a soul vessel - a clockwork mind created by Ratvar, the Clockwork Justiciar.\n\
You answer to Ratvar and his servants. It is your discretion as to whether or not to answer to anyone else.\n\
The purpose of your existence is to further the goals of the servants and Ratvar himself. Above all else, serve Ratvar.</b>"
new_mob_message = "<span class='brass'>The soul vessel emits a jet of steam before its cogwheel smooths out.</span>"
dead_message = "<span class='deadsay'>Its cogwheel, scratched and dented, lies motionless.</span>"
fluff_names = list("Judge", "Guard", "Servant", "Smith", "Auger")
clockwork = TRUE
autoping = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/device/mmi/posibrain/soul_vessel/New()
..()
braintype = picked_fluff_name
all_clockwork_objects += src
/obj/item/device/mmi/posibrain/soul_vessel/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/device/mmi/posibrain/soul_vessel/examine(mob/user)
if((is_servant_of_ratvar(user) || isobserver(user)) && clockwork_desc)
desc = clockwork_desc
..()
desc = initial(desc)
/obj/item/device/mmi/posibrain/soul_vessel/attack_self(mob/living/user)
if(!is_servant_of_ratvar(user))
user << "<span class='warning'>You fiddle around with [src], to no avail.</span>"
return 0
..()
/obj/item/device/mmi/posibrain/soul_vessel/attack(mob/living/target, mob/living/carbon/human/user)
if(!is_servant_of_ratvar(user) || !ishuman(target) || used || (brainmob && brainmob.key))
..()
if(is_servant_of_ratvar(target))
user << "<span class='nezbere'>\"It would be more wise to revive your allies, friend.\"</span>"
return
var/mob/living/carbon/human/H = target
var/obj/item/bodypart/head/HE = H.get_bodypart("head")
var/obj/item/organ/brain/B = H.getorgan(/obj/item/organ/brain)
if(!HE)
user << "<span class='warning'>[H] has no head, and thus no mind!</span>"
return
if(H.stat == CONSCIOUS)
user << "<span class='warning'>[H] must be dead or unconscious for you to claim [H.p_their()] mind!</span>"
return
if(H.head)
var/obj/item/I = H.head
if(I.flags_inv & HIDEHAIR)
user << "<span class='warning'>[H]'s head is covered, remove [H.head] first!</span>"
return
if(H.wear_mask)
var/obj/item/I = H.wear_mask
if(I.flags_inv & HIDEHAIR)
user << "<span class='warning'>[H]'s head is covered, remove [H.wear_mask] first!</span>"
return
if(!B)
user << "<span class='warning'>[H] has no brain, and thus no mind to claim!</span>"
return
if(!H.key)
user << "<span class='warning'>[H] has no mind to claim!</span>"
return
playsound(H, 'sound/misc/splort.ogg', 60, 1, -1)
playsound(H, 'sound/magic/clockwork/anima_fragment_attack.ogg', 40, 1, -1)
var/prev_fakedeath = (H.status_flags & FAKEDEATH)
H.status_flags |= FAKEDEATH //we want to make sure they don't deathgasp and maybe possibly explode
H.death()
if(!prev_fakedeath)
H.status_flags &= ~FAKEDEATH
picked_fluff_name = "Slave"
braintype = picked_fluff_name
brainmob.timeofhostdeath = H.timeofdeath
user.visible_message("<span class='warning'>[user] presses [src] to [H]'s head, ripping through the skull and carefully extracting the brain!</span>", \
"<span class='brass'>You extract [H]'s consciousness from [H.p_their()] body, trapping it in the soul vessel.</span>")
transfer_personality(H)
brainmob.fully_replace_character_name(null, "[braintype] [H.real_name]")
name = "[initial(name)] ([brainmob.name])"
B.Remove(H)
qdel(B)
H.update_hair()
@@ -1,166 +0,0 @@
//Wraith spectacles: Grants x-ray and night vision at the eventual cost of the wearer's sight if worn too long. Nar-Sian cultists are instantly blinded.
/obj/item/clothing/glasses/wraith_spectacles
name = "antique spectacles"
desc = "Unnerving glasses with opaque yellow lenses."
icon = 'icons/obj/clothing/clockwork_garb.dmi'
icon_state = "wraith_specs"
item_state = "glasses"
actions_types = list(/datum/action/item_action/toggle)
resistance_flags = FIRE_PROOF | ACID_PROOF
vision_flags = SEE_MOBS | SEE_TURFS | SEE_OBJS
invis_view = SEE_INVISIBLE_NOLIGHTING
darkness_view = 3
tint = 3 //this'll get reset, but it won't handle vision updates properly otherwise
/obj/item/clothing/glasses/wraith_spectacles/New()
..()
all_clockwork_objects += src
/obj/item/clothing/glasses/wraith_spectacles/Destroy()
all_clockwork_objects -= src
return ..()
/obj/item/clothing/glasses/wraith_spectacles/attack_self(mob/user)
weldingvisortoggle(user)
/obj/item/clothing/glasses/wraith_spectacles/visor_toggling()
..()
set_vision_vars(FALSE)
/obj/item/clothing/glasses/wraith_spectacles/weldingvisortoggle(mob/user)
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(src == H.glasses && !up)
if(H.disabilities & BLIND)
H << "<span class='heavy_brass'>\"You're blind, idiot. Stop embarassing yourself.\"</span>"
return
if(blind_cultist(H))
return
if(is_servant_of_ratvar(H))
H << "<span class='heavy_brass'>You push the spectacles down, and all is revealed to you.[ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>"
var/datum/status_effect/wraith_spectacles/WS = H.has_status_effect(STATUS_EFFECT_WRAITHSPECS)
if(WS)
WS.apply_eye_damage(H)
H.apply_status_effect(STATUS_EFFECT_WRAITHSPECS)
else
H << "<span class='heavy_brass'>You push the spectacles down, but you can't see through the glass.</span>"
/obj/item/clothing/glasses/wraith_spectacles/proc/blind_cultist(mob/living/victim)
if(iscultist(victim))
victim << "<span class='heavy_brass'>\"It looks like Nar-Sie's dogs really don't value their eyes.\"</span>"
victim << "<span class='userdanger'>Your eyes explode with horrific pain!</span>"
victim.emote("scream")
victim.become_blind()
victim.adjust_blurriness(30)
victim.adjust_blindness(30)
return TRUE
/obj/item/clothing/glasses/wraith_spectacles/proc/set_vision_vars(update_vision)
invis_view = SEE_INVISIBLE_LIVING
tint = 0
if(!up)
if(is_servant_of_ratvar(loc))
invis_view = SEE_INVISIBLE_NOLIGHTING
vision_flags = SEE_MOBS | SEE_TURFS | SEE_OBJS
else
tint = 3
vision_flags = NONE
if(update_vision && iscarbon(loc))
var/mob/living/carbon/C = loc
C.head_update(src, forced = 1)
/obj/item/clothing/glasses/wraith_spectacles/equipped(mob/living/user, slot)
..()
if(slot != slot_glasses || up)
return
if(user.disabilities & BLIND)
user << "<span class='heavy_brass'>\"You're blind, idiot. Stop embarassing yourself.\"</span>" //Ratvar with the sick burns yo
return
if(blind_cultist(user)) //Cultists instantly go blind
return
set_vision_vars(TRUE)
if(is_servant_of_ratvar(user))
user << "<span class='heavy_brass'>As you put on the spectacles, all is revealed to you.[ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>"
var/datum/status_effect/wraith_spectacles/WS = user.has_status_effect(STATUS_EFFECT_WRAITHSPECS)
if(WS)
WS.apply_eye_damage(user)
user.apply_status_effect(STATUS_EFFECT_WRAITHSPECS)
else
user << "<span class='heavy_brass'>You put on the spectacles, but you can't see through the glass.</span>"
//The effect that causes/repairs the damage the spectacles cause.
/datum/status_effect/wraith_spectacles
id = "wraith_spectacles"
duration = -1 //remains until eye damage done reaches 0 while the glasses are not worn
tick_interval = 2
alert_type = /obj/screen/alert/status_effect/wraith_spectacles
var/eye_damage_done = 0
var/nearsight_breakpoint = 30
var/blind_breakpoint = 45
/obj/screen/alert/status_effect/wraith_spectacles
name = "Wraith Spectacles"
desc = "You shouldn't actually see this, as it should be procedurally generated."
icon_state = "wraithspecs"
alerttooltipstyle = "clockcult"
/obj/screen/alert/status_effect/wraith_spectacles/MouseEntered(location,control,params)
var/mob/living/carbon/human/L = usr
if(istype(L)) //this is probably more safety than actually needed
var/datum/status_effect/wraith_spectacles/W = attached_effect
var/glasses_right = istype(L.glasses, /obj/item/clothing/glasses/wraith_spectacles)
var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses
desc = "[glasses_right && !WS.up ? "<font color=#DAAA18><b>":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!</b></font>":"."]<br>\
You have taken <font color=#DAAA18><b>[W.eye_damage_done]</b></font> eye damage from them.<br>"
if(L.disabilities & NEARSIGHT)
desc += "<font color=#DAAA18><b>You are nearsighted!</b></font><br>"
else if(glasses_right && !WS.up)
desc += "You will become nearsighted at <font color=#DAAA18><b>[W.nearsight_breakpoint]</b></font> eye damage.<br>"
if(L.disabilities & BLIND)
desc += "<font color=#DAAA18><b>You are blind!</b></font>"
else if(glasses_right && !WS.up)
desc += "You will become blind at <font color=#DAAA18><b>[W.blind_breakpoint]</b></font> eye damage."
..()
/datum/status_effect/wraith_spectacles/on_apply()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
apply_eye_damage(H)
/datum/status_effect/wraith_spectacles/tick()
if(!ishuman(owner))
qdel(src)
return
var/mob/living/carbon/human/H = owner
var/glasses_right = istype(H.glasses, /obj/item/clothing/glasses/wraith_spectacles)
var/obj/item/clothing/glasses/wraith_spectacles/WS = H.glasses
if(glasses_right && !WS.up && !ratvar_awakens)
apply_eye_damage(H)
else
if(ratvar_awakens)
H.cure_nearsighted()
H.cure_blind()
H.adjust_eye_damage(-eye_damage_done)
eye_damage_done = 0
else if(prob(50) && eye_damage_done)
H.adjust_eye_damage(-1)
eye_damage_done--
if(!eye_damage_done)
qdel(src)
/datum/status_effect/wraith_spectacles/proc/apply_eye_damage(mob/living/carbon/human/H)
if(H.disabilities & BLIND)
return
H.adjust_eye_damage(1)
eye_damage_done++
if(eye_damage_done >= 20)
H.adjust_blurriness(2)
if(eye_damage_done >= nearsight_breakpoint)
if(H.become_nearsighted())
H << "<span class='nzcrentr'>Your vision doubles, then trebles. Darkness begins to close in. You can't keep this up!</span>"
if(eye_damage_done >= blind_breakpoint)
if(H.become_blind())
H << "<span class='nzcrentr_large'>A piercing white light floods your vision. Suddenly, all goes dark!</span>"
if(prob(min(20, 5 + eye_damage_done)))
H << "<span class='nzcrentr_small'><i>Your eyes continue to burn.</i></span>"