Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
@@ -128,11 +128,11 @@
var/obj/item/clockwork/component/C = I
if(required_components[C.component_id])
required_components[C.component_id]--
user << "<span class='notice'>You add [C] to [src].</span>"
to_chat(user, "<span class='notice'>You add [C] to [src].</span>")
user.drop_item()
qdel(C)
else
user << "<span class='notice'>[src] has enough [get_component_name(C.component_id)][C.component_id != REPLICANT_ALLOY ? "s":""].</span>"
to_chat(user, "<span class='notice'>[src] has enough [get_component_name(C.component_id)][C.component_id != REPLICANT_ALLOY ? "s":""].</span>")
return 1
else if(istype(I, /obj/item/clockwork/slab))
var/obj/item/clockwork/slab/S = I
@@ -173,34 +173,34 @@
icon_state = initial(icon_state)
if(is_servant_of_ratvar(user) || isobserver(user))
if(still_needs_components())
user << "<span class='big'><b>Components required until activation:</b></span>"
to_chat(user, "<span class='big'><b>Components required until activation:</b></span>")
for(var/i in required_components)
if(required_components[i])
user << "<span class='[get_component_span(i)]'>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</span> \
<span class='[get_component_span(i)]_large'>[required_components[i]]</span>"
to_chat(user, "<span class='[get_component_span(i)]'>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</span> \
<span class='[get_component_span(i)]_large'>[required_components[i]]</span>")
else
user << "<span class='big'><b>Seconds until [ratvar_portal ? "Ratvar's arrival":"Proselytization"]:</b> [get_arrival_text(TRUE)]</span>"
to_chat(user, "<span class='big'><b>Seconds until [ratvar_portal ? "Ratvar's arrival":"Proselytization"]:</b> [get_arrival_text(TRUE)]</span>")
switch(progress_in_seconds)
if(-INFINITY to GATEWAY_REEBE_FOUND)
user << "<span class='heavy_brass'>It's still opening.</span>"
to_chat(user, "<span class='heavy_brass'>It's still opening.</span>")
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
user << "<span class='heavy_brass'>It's reached the Celestial Derelict and is drawing power from it.</span>"
to_chat(user, "<span class='heavy_brass'>It's reached the Celestial Derelict and is drawing power from it.</span>")
if(GATEWAY_RATVAR_COMING to INFINITY)
user << "<span class='heavy_brass'>[ratvar_portal ? "Ratvar is coming through the gateway":"The gateway is glowing with massed power"]!</span>"
to_chat(user, "<span class='heavy_brass'>[ratvar_portal ? "Ratvar is coming through the gateway":"The gateway is glowing with massed power"]!</span>")
else
switch(progress_in_seconds)
if(-INFINITY to GATEWAY_REEBE_FOUND)
user << "<span class='warning'>It's a swirling mass of blackness.</span>"
to_chat(user, "<span class='warning'>It's a swirling mass of blackness.</span>")
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
user << "<span class='warning'>It seems to be leading somewhere.</span>"
to_chat(user, "<span class='warning'>It seems to be leading somewhere.</span>")
if(GATEWAY_RATVAR_COMING to INFINITY)
user << "<span class='boldwarning'>[ratvar_portal ? "Something is coming through":"It's glowing brightly"]!</span>"
to_chat(user, "<span class='boldwarning'>[ratvar_portal ? "Something is coming through":"It's glowing brightly"]!</span>")
/obj/structure/destructible/clockwork/massive/celestial_gateway/process()
if(!first_sound_played || prob(7))
for(var/M in player_list)
if(M && !isnewplayer(M))
M << "<span class='warning'><b>You hear otherworldly sounds from the [dir2text(get_dir(get_turf(M), get_turf(src)))]...</span>"
to_chat(M, "<span class='warning'><b>You hear otherworldly sounds from the [dir2text(get_dir(get_turf(M), get_turf(src)))]...</span>")
if(!obj_integrity)
return 0
var/convert_dist = 1 + (round(Floor(progress_in_seconds, 15) * 0.067))
@@ -315,3 +315,10 @@
pixel_x = -32
pixel_y = -32
layer = BELOW_OPEN_DOOR_LAYER
light_range = 2
light_power = 4
light_color = "#6A4D2F"
/obj/effect/clockwork/overlay/gateway_glow/New()
..()
update_light()
@@ -14,10 +14,10 @@
return 0
var/obj/item/device/mmi/posibrain/soul_vessel/S = I
if(!S.brainmob)
user << "<span class='warning'>[S] is inactive! Turn it on or capture a mind first.</span>"
to_chat(user, "<span class='warning'>[S] is inactive! Turn it on or capture a mind first.</span>")
return 0
if(S.brainmob && (!S.brainmob.client || !S.brainmob.mind))
user << "<span class='warning'>[S]'s trapped consciousness appears inactive!</span>"
to_chat(user, "<span class='warning'>[S]'s trapped consciousness appears inactive!</span>")
return 0
user.visible_message("<span class='notice'>[user] places [S] in [src], where it fuses to the shell.</span>", "<span class='brass'>You place [S] in [src], fusing it to the shell.</span>")
var/mob/living/simple_animal/A = new mobtype(get_turf(src))
@@ -24,12 +24,12 @@
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='nzcrentr_small'>It requires <b>[hierophant_cost]W</b> to broadcast over the Hierophant Network, and <b>[gateway_cost]W</b> to open a Spatial Gateway.</span>"
to_chat(user, "<span class='nzcrentr_small'>It requires <b>[hierophant_cost]W</b> to broadcast over the Hierophant Network, and <b>[gateway_cost]W</b> to open a Spatial Gateway.</span>")
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/can_be_unfasten_wrench(mob/user, silent)
if(active)
if(!silent)
user << "<span class='warning'>[src] is currently sustaining a gateway!</span>"
to_chat(user, "<span class='warning'>[src] is currently sustaining a gateway!</span>")
return FAILED_UNFASTEN
return ..()
@@ -44,40 +44,40 @@
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/attack_hand(mob/living/user)
if(!is_servant_of_ratvar(user) || total_accessable_power() < hierophant_cost || !anchored)
user << "<span class='warning'>You place your hand on the obelisk, but it doesn't react.</span>"
to_chat(user, "<span class='warning'>You place your hand on the obelisk, but it doesn't react.</span>")
return
var/choice = alert(user,"You place your hand on the obelisk...",,"Hierophant Broadcast","Spatial Gateway","Cancel")
switch(choice)
if("Hierophant Broadcast")
if(active)
user << "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>"
to_chat(user, "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>")
return
if(!user.can_speak_vocal())
user << "<span class='warning'>You cannot speak through the obelisk!</span>"
to_chat(user, "<span class='warning'>You cannot speak through the obelisk!</span>")
return
var/input = stripped_input(usr, "Please choose a message to send over the Hierophant Network.", "Hierophant Broadcast", "")
if(!is_servant_of_ratvar(user) || !input || !user.canUseTopic(src, !issilicon(user)))
return
if(active)
user << "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>"
to_chat(user, "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>")
return
if(!try_use_power(hierophant_cost))
user << "<span class='warning'>The obelisk lacks the power to broadcast!</span>"
to_chat(user, "<span class='warning'>The obelisk lacks the power to broadcast!</span>")
return
if(!user.can_speak_vocal())
user << "<span class='warning'>You cannot speak through the obelisk!</span>"
to_chat(user, "<span class='warning'>You cannot speak through the obelisk!</span>")
return
clockwork_say(user, text2ratvar("Hierophant Broadcast, activate! [html_decode(input)]"))
titled_hierophant_message(user, input, "big_brass", "large_brass")
if("Spatial Gateway")
if(active)
user << "<span class='warning'>The obelisk is already sustaining a gateway!</span>"
to_chat(user, "<span class='warning'>The obelisk is already sustaining a gateway!</span>")
return
if(!try_use_power(gateway_cost))
user << "<span class='warning'>The obelisk lacks the power to open a gateway!</span>"
to_chat(user, "<span class='warning'>The obelisk lacks the power to open a gateway!</span>")
return
if(!user.can_speak_vocal())
user << "<span class='warning'>You need to be able to speak to open a gateway!</span>"
to_chat(user, "<span class='warning'>You need to be able to speak to open a gateway!</span>")
return
if(procure_gateway(user, round(100 * get_efficiency_mod(), 1), round(5 * get_efficiency_mod(), 1), 1) && !active)
clockwork_say(user, text2ratvar("Spatial Gateway, activate!"))
@@ -5,6 +5,7 @@
clockwork_desc = "A binding ring around a target, preventing them from taking action while they're being converted."
max_integrity = 25
obj_integrity = 25
light_color = "#AF0AAF"
density = FALSE
immune_to_servant_attacks = TRUE
icon = 'icons/effects/clockwork_effects.dmi'
@@ -19,6 +20,10 @@
var/can_resist = FALSE
var/mob_layer = MOB_LAYER
/obj/structure/destructible/clockwork/geis_binding/New()
..()
set_light(2, 0.5)
/obj/structure/destructible/clockwork/geis_binding/examine(mob/user)
icon_state = "geisbinding_full"
..()
@@ -19,24 +19,28 @@
var/interdiction_range = 14 //how large an area it drains and disables in
var/static/list/rage_messages = list("...", "Disgusting.", "Die.", "Foul.", "Worthless.", "Mortal.", "Unfit.", "Weak.", "Fragile.", "Useless.", "Leave my sight!")
/obj/structure/destructible/clockwork/powered/interdiction_lens/New()
..()
set_light(1.4, 0.8, "#F42B9D")
/obj/structure/destructible/clockwork/powered/interdiction_lens/examine(mob/user)
..()
user << "<span class='[recharging > world.time ? "neovgre_small":"brass"]'>Its gemstone [recharging > world.time ? "has been breached by writhing tendrils of blackness that cover the totem" \
: "vibrates in place and thrums with power"].</span>"
to_chat(user, "<span class='[recharging > world.time ? "neovgre_small":"brass"]'>Its gemstone [recharging > world.time ? "has been breached by writhing tendrils of blackness that cover the totem" \
: "vibrates in place and thrums with power"].</span>")
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='neovgre_small'>If it fails to drain any electronics or has nothing to return power to, it will disable itself for <b>[round(recharge_time/600, 1)]</b> minutes.</span>"
to_chat(user, "<span class='neovgre_small'>If it fails to drain any electronics or has nothing to return power to, it will disable itself for <b>[round(recharge_time/600, 1)]</b> minutes.</span>")
/obj/structure/destructible/clockwork/powered/interdiction_lens/toggle(fast_process, mob/living/user)
. = ..()
if(active)
SetLuminosity(4, 2)
set_light(2, 1.6, "#EE54EE")
else
SetLuminosity(0)
set_light(1.4, 0.8, "#F42B9D")
/obj/structure/destructible/clockwork/powered/interdiction_lens/attack_hand(mob/living/user)
if(user.canUseTopic(src, !issilicon(user), NO_DEXTERY))
if(disabled)
user << "<span class='warning'>As you place your hand on the gemstone, cold tendrils of black matter crawl up your arm. You quickly pull back.</span>"
to_chat(user, "<span class='warning'>As you place your hand on the gemstone, cold tendrils of black matter crawl up your arm. You quickly pull back.</span>")
return 0
toggle(0, user)
@@ -49,7 +53,7 @@
recharging = world.time + recharge_time
flick("interdiction_lens_discharged", src)
icon_state = "interdiction_lens_inactive"
SetLuminosity(2,1)
set_light(2, 1.6, "#151200")
disabled = TRUE
return TRUE
@@ -92,7 +96,7 @@
power_drained += Floor(A.power_drain(TRUE) * efficiency, MIN_CLOCKCULT_POWER)
if(prob(1 * rage_modifier))
A << "<span class='neovgre'>\"[text2ratvar(pick(rage_messages))]\"</span>"
to_chat(A, "<span class='neovgre'>\"[text2ratvar(pick(rage_messages))]\"</span>")
if(prob(100 * (efficiency * efficiency)))
if(istype(A, /obj/machinery/camera) && unconverted_ai)
@@ -8,9 +8,10 @@
inactive_icon = "mania_motor_inactive"
unanchored_icon = "mania_motor_unwrenched"
construction_value = 20
break_message = "<span class='warning'>The antenna break off, leaving a pile of shards!</span>"
max_integrity = 100
obj_integrity = 100
break_message = "<span class='warning'>The antenna break off, leaving a pile of shards!</span>"
light_color = "#AF0AAF"
debris = list(/obj/item/clockwork/alloy_shards/large = 2, \
/obj/item/clockwork/alloy_shards/small = 2, \
/obj/item/clockwork/component/geis_capacitor/antennae = 1)
@@ -30,7 +31,7 @@
/obj/structure/destructible/clockwork/powered/mania_motor/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='sevtug_small'>It requires <b>[mania_cost]W</b> to run, and at least <b>[convert_cost]W</b> to attempt to convert humans adjacent to it.</span>"
to_chat(user, "<span class='sevtug_small'>It requires <b>[mania_cost]W</b> to run, and at least <b>[convert_cost]W</b> to attempt to convert humans adjacent to it.</span>")
/obj/structure/destructible/clockwork/powered/mania_motor/forced_disable(bad_effects)
if(active)
@@ -44,16 +45,16 @@
/obj/structure/destructible/clockwork/powered/mania_motor/attack_hand(mob/living/user)
if(user.canUseTopic(src, !issilicon(user), NO_DEXTERY) && is_servant_of_ratvar(user))
if(!total_accessable_power() >= mania_cost)
user << "<span class='warning'>[src] needs more power to function!</span>"
to_chat(user, "<span class='warning'>[src] needs more power to function!</span>")
return 0
toggle(0, user)
/obj/structure/destructible/clockwork/powered/mania_motor/toggle(fast_process, mob/living/user)
. = ..()
if(active)
SetLuminosity(2, 1)
set_light(2, 0.9)
else
SetLuminosity(0)
set_light(0)
/obj/structure/destructible/clockwork/powered/mania_motor/process()
if(!try_use_power(mania_cost))
@@ -81,10 +82,10 @@
var/sound_distance = falloff_distance * 0.5
var/targetbrainloss = H.getBrainLoss()
if(distance > 3 && prob(falloff_distance * 0.5))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
to_chat(H, "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>")
if(distance <= 1)
if(!H.Adjacent(src))
H << "<span class='sevtug'>\"[text2ratvar(pick(close_messages))]\"</span>"
to_chat(H, "<span class='sevtug'>\"[text2ratvar(pick(close_messages))]\"</span>")
H.playsound_local(T, hum, sound_distance, 1)
else if(!try_use_power(convert_cost))
visible_message("<span class='warning'>[src]'s antennae fizzle quietly.</span>")
@@ -98,7 +99,7 @@
else
H.Paralyse(3)
else if(is_eligible_servant(H))
H << "<span class='sevtug'>\"[text2ratvar("You are mine and his, now.")]\"</span>"
to_chat(H, "<span class='sevtug'>\"[text2ratvar("You are mine and his, now.")]\"</span>")
add_servant_of_ratvar(H)
H.Paralyse(5)
else
@@ -107,9 +108,9 @@
if(0 to 3)
if(prob(falloff_distance * 0.5))
if(prob(falloff_distance))
H << "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>"
to_chat(H, "<span class='sevtug_small'>\"[text2ratvar(pick(mania_messages))]\"</span>")
else
H << "<span class='sevtug'>\"[text2ratvar(pick(compel_messages))]\"</span>"
to_chat(H, "<span class='sevtug'>\"[text2ratvar(pick(compel_messages))]\"</span>")
if(targetbrainloss <= 40)
H.adjustBrainLoss(3 * efficiency)
H.adjust_drugginess(Clamp(7 * efficiency, 0, 50 - H.druggy))
@@ -32,7 +32,7 @@
/obj/structure/destructible/clockwork/powered/mending_motor/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "<span class='inathneq_small'>It requires at least <b>[heal_cost]W</b> to attempt to repair clockwork mobs, structures, or converted silicons.</span>"
to_chat(user, "<span class='inathneq_small'>It requires at least <b>[heal_cost]W</b> to attempt to repair clockwork mobs, structures, or converted silicons.</span>")
/obj/structure/destructible/clockwork/powered/mending_motor/forced_disable(bad_effects)
if(active)
@@ -45,7 +45,7 @@
/obj/structure/destructible/clockwork/powered/mending_motor/attack_hand(mob/living/user)
if(user.canUseTopic(src, !issilicon(user), NO_DEXTERY) && is_servant_of_ratvar(user))
if(total_accessable_power() < MIN_CLOCKCULT_POWER)
user << "<span class='warning'>[src] needs more power to function!</span>"
to_chat(user, "<span class='warning'>[src] needs more power to function!</span>")
return 0
toggle(0, user)
@@ -64,10 +64,10 @@
S.adjustHealth(-(8 * efficiency))
new /obj/effect/overlay/temp/heal(T, "#1E8CE1")
else
S << "<span class='inathneq'>\"[text2ratvar(pick(heal_failure_messages))]\"</span>"
to_chat(S, "<span class='inathneq'>\"[text2ratvar(pick(heal_failure_messages))]\"</span>")
break
else
S << "<span class='inathneq'>\"[text2ratvar(pick(heal_finish_messages))]\"</span>"
to_chat(S, "<span class='inathneq'>\"[text2ratvar(pick(heal_finish_messages))]\"</span>")
break
else if(is_type_in_typecache(M, mending_motor_typecache))
T = get_turf(M)
@@ -97,10 +97,10 @@
S.heal_ordered_damage(8 * efficiency, damage_heal_order)
new /obj/effect/overlay/temp/heal(T, "#1E8CE1")
else
S << "<span class='inathneq'>\"[text2ratvar(pick(heal_failure_messages))]\"</span>"
to_chat(S, "<span class='inathneq'>\"[text2ratvar(pick(heal_failure_messages))]\"</span>")
break
else
S << "<span class='inathneq'>\"[text2ratvar(pick(heal_finish_messages))]\"</span>"
to_chat(S, "<span class='inathneq'>\"[text2ratvar(pick(heal_finish_messages))]\"</span>")
break
. = ..()
if(. < heal_cost)
@@ -27,7 +27,7 @@
/obj/structure/destructible/clockwork/ocular_warden/examine(mob/user)
..()
user << "<span class='brass'>[target ? "<b>It's fixated on [target]!</b>" : "Its gaze is wandering aimlessly."]</span>"
to_chat(user, "<span class='brass'>[target ? "<b>It's fixated on [target]!</b>" : "Its gaze is wandering aimlessly."]</span>")
/obj/structure/destructible/clockwork/ocular_warden/hulk_damage()
return 25
@@ -36,12 +36,12 @@
if(anchored)
if(obj_integrity <= max_integrity * 0.25)
if(!silent)
user << "<span class='warning'>[src] is too damaged to unsecure!</span>"
to_chat(user, "<span class='warning'>[src] is too damaged to unsecure!</span>")
return FAILED_UNFASTEN
else
for(var/obj/structure/destructible/clockwork/ocular_warden/W in orange(OCULAR_WARDEN_EXCLUSION_RANGE, src))
if(!silent)
user << "<span class='neovgre'>You sense another ocular warden too near this location. Activating this one this close would cause them to fight.</span>"
to_chat(user, "<span class='neovgre'>You sense another ocular warden too near this location. Activating this one this close would cause them to fight.</span>")
return FAILED_UNFASTEN
return SUCCESSFUL_UNFASTEN
@@ -97,10 +97,10 @@
visible_message("<span class='warning'>[src] swivels to face [target]!</span>")
if(isliving(target))
var/mob/living/L = target
L << "<span class='heavy_brass'>\"I SEE YOU!\"</span>\n<span class='userdanger'>[src]'s gaze [ratvar_awakens ? "melts you alive" : "burns you"]!</span>"
to_chat(L, "<span class='heavy_brass'>\"I SEE YOU!\"</span>\n<span class='userdanger'>[src]'s gaze [ratvar_awakens ? "melts you alive" : "burns you"]!</span>")
else if(istype(target,/obj/mecha))
var/obj/mecha/M = target
M.occupant << "<span class='heavy_brass'>\"I SEE YOU!\"</span>" //heeeellooooooo, person in mech.
to_chat(M.occupant, "<span class='heavy_brass'>\"I SEE YOU!\"</span>" )
else if(prob(0.5)) //Extremely low chance because of how fast the subsystem it uses processes
if(prob(50))
visible_message("<span class='notice'>[src][pick(idle_messages)]</span>")
@@ -113,7 +113,7 @@
var/obj/item/weapon/storage/book/bible/B = L.bible_check()
if(B)
if(!(B.resistance_flags & ON_FIRE))
L << "<span class='warning'>Your [B.name] bursts into flames!</span>"
to_chat(L, "<span class='warning'>Your [B.name] bursts into flames!</span>")
for(var/obj/item/weapon/storage/book/bible/BI in L.GetAllContents())
if(!(BI.resistance_flags & ON_FIRE))
BI.fire_act()
@@ -9,6 +9,9 @@
pixel_y = -248
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
appearance_flags = 0
light_power = 0.7
light_range = 15
light_color = rgb(190, 135, 0)
var/atom/prey //Whatever Ratvar is chasing
var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE
var/proselytize_range = 10
@@ -73,13 +76,13 @@
meals += L
if(meals.len)
prey = pick(meals)
prey << "<span class='heavy_brass'><font size=5>\"You will do.\"</font></span>\n\
<span class='userdanger'>Something very large and very malevolent begins lumbering its way towards you...</span>"
to_chat(prey, "<span class='heavy_brass'><font size=5>\"You will do.\"</font></span>\n\
<span class='userdanger'>Something very large and very malevolent begins lumbering its way towards you...</span>")
prey << 'sound/effects/ratvar_reveal.ogg'
else
if((!istype(prey, /obj/singularity/narsie) && prob(10)) || is_servant_of_ratvar(prey) || prey.z != z)
prey << "<span class='heavy_brass'><font size=5>\"How dull. Leave me.\"</font></span>\n\
<span class='userdanger'>You feel tremendous relief as a set of horrible eyes loses sight of you...</span>"
to_chat(prey, "<span class='heavy_brass'><font size=5>\"How dull. Leave me.\"</font></span>\n\
<span class='userdanger'>You feel tremendous relief as a set of horrible eyes loses sight of you...</span>")
prey = null
else
dir_to_step_in = get_dir(src, prey) //Unlike Nar-Sie, Ratvar ruthlessly chases down his target
@@ -89,8 +92,8 @@
if(clashing)
return FALSE
clashing = TRUE
world << "<span class='heavy_brass'><font size=5>\"[pick("BLOOD GOD!!!", "NAR-SIE!!!", "AT LAST, YOUR TIME HAS COME!")]\"</font></span>"
world << "<span class='cult'><font size=5>\"<b>Ratvar?! How?!</b>\"</font></span>"
to_chat(world, "<span class='heavy_brass'><font size=5>\"[pick("BLOOD GOD!!!", "NAR-SIE!!!", "AT LAST, YOUR TIME HAS COME!")]\"</font></span>")
to_chat(world, "<span class='cult'><font size=5>\"<b>Ratvar?! How?!</b>\"</font></span>")
for(var/obj/singularity/narsie/N in range(15, src))
if(N.clashing)
continue
@@ -10,6 +10,7 @@
break_message = "<span class='warning'>The cache's fire winks out before it falls in on itself!</span>"
max_integrity = 80
obj_integrity = 80
light_color = "#C2852F"
var/wall_generation_cooldown
var/turf/closed/wall/clockwork/linkedwall //if we've got a linked wall and are producing
@@ -18,7 +19,7 @@
START_PROCESSING(SSobj, src)
clockwork_caches++
update_slab_info()
SetLuminosity(2,1)
set_light(2, 0.7)
/obj/structure/destructible/clockwork/cache/Destroy()
clockwork_caches--
@@ -54,18 +55,18 @@
if(istype(I, /obj/item/clockwork/component))
var/obj/item/clockwork/component/C = I
if(!anchored)
user << "<span class='warning'>[src] needs to be secured to place [C] into it!</span>"
to_chat(user, "<span class='warning'>[src] needs to be secured to place [C] into it!</span>")
else
clockwork_component_cache[C.component_id]++
update_slab_info()
user << "<span class='notice'>You add [C] to [src].</span>"
to_chat(user, "<span class='notice'>You add [C] to [src].</span>")
user.drop_item()
qdel(C)
return 1
else if(istype(I, /obj/item/clockwork/slab))
var/obj/item/clockwork/slab/S = I
if(!anchored)
user << "<span class='warning'>[src] needs to be secured to offload your slab's components into it!</span>"
to_chat(user, "<span class='warning'>[src] needs to be secured to offload your slab's components into it!</span>")
else
for(var/i in S.stored_components)
clockwork_component_cache[i] += S.stored_components[i]
@@ -76,27 +77,34 @@
else
return ..()
/obj/structure/destructible/clockwork/cache/update_anchored(mob/user, do_damage)
..()
if(anchored)
set_light(2, 0.7)
else
set_light(0)
/obj/structure/destructible/clockwork/cache/attack_hand(mob/living/user)
..()
if(is_servant_of_ratvar(user))
if(linkedwall)
if(wall_generation_cooldown > world.time)
var/temp_time = (wall_generation_cooldown - world.time) * 0.1
user << "<span class='alloy'>[src] will produce a component in <b>[temp_time]</b> second[temp_time == 1 ? "":"s"].</span>"
to_chat(user, "<span class='alloy'>[src] will produce a component in <b>[temp_time]</b> second[temp_time == 1 ? "":"s"].</span>")
else
user << "<span class='brass'>[src] is about to produce a component!</span>"
to_chat(user, "<span class='brass'>[src] is about to produce a component!</span>")
else if(anchored)
user << "<span class='alloy'>[src] is unlinked! Construct a Clockwork Wall nearby to generate components!</span>"
to_chat(user, "<span class='alloy'>[src] is unlinked! Construct a Clockwork Wall nearby to generate components!</span>")
else
user << "<span class='alloy'>[src] needs to be secured to generate components!</span>"
to_chat(user, "<span class='alloy'>[src] needs to be secured to generate components!</span>")
/obj/structure/destructible/clockwork/cache/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
if(linkedwall)
user << "<span class='brass'>It is linked to a Clockwork Wall and will generate a component every <b>[round((CACHE_PRODUCTION_TIME * 0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds!</span>"
to_chat(user, "<span class='brass'>It is linked to a Clockwork Wall and will generate a component every <b>[round((CACHE_PRODUCTION_TIME * 0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds!</span>")
else
user << "<span class='alloy'>It is unlinked! Construct a Clockwork Wall nearby to generate components!</span>"
user << "<b>Stored components:</b>"
to_chat(user, "<span class='alloy'>It is unlinked! Construct a Clockwork Wall nearby to generate components!</span>")
to_chat(user, "<b>Stored components:</b>")
for(var/i in clockwork_component_cache)
user << "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[clockwork_component_cache[i]]</b></span>"
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[clockwork_component_cache[i]]</b></span>")
@@ -43,12 +43,12 @@
if(is_servant_of_ratvar(user) || isobserver(user))
if(active)
if(component_id_to_produce)
user << "<span class='[get_component_span(component_id_to_produce)]_small'>It is currently producing [get_component_name(component_id_to_produce)][component_id_to_produce != REPLICANT_ALLOY ? "s":""].</span>"
to_chat(user, "<span class='[get_component_span(component_id_to_produce)]_small'>It is currently producing [get_component_name(component_id_to_produce)][component_id_to_produce != REPLICANT_ALLOY ? "s":""].</span>")
else
user << "<span class='brass'>It is currently producing random components.</span>"
user << "<span class='nezbere_small'>It will produce a component every <b>[round((production_cooldown*0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds and requires at least the following power for each component type:</span>"
to_chat(user, "<span class='brass'>It is currently producing random components.</span>")
to_chat(user, "<span class='nezbere_small'>It will produce a component every <b>[round((production_cooldown*0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds and requires at least the following power for each component type:</span>")
for(var/i in clockwork_component_cache)
user << "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)]:</i> <b>[get_component_cost(i)]W</b> <i>([clockwork_component_cache[i]] exist[clockwork_component_cache[i] == 1 ? "s" : ""])</i></span>"
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)]:</i> <b>[get_component_cost(i)]W</b> <i>([clockwork_component_cache[i]] exist[clockwork_component_cache[i] == 1 ? "s" : ""])</i></span>")
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/forced_disable(bad_effects)
if(active)
@@ -63,23 +63,23 @@
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/attack_hand(mob/living/user)
if(!is_servant_of_ratvar(user))
user << "<span class='warning'>You place your hand on the daemon, but nothing happens.</span>"
to_chat(user, "<span class='warning'>You place your hand on the daemon, but nothing happens.</span>")
return
if(active)
toggle(0, user)
else
if(!anchored)
user << "<span class='warning'>[src] needs to be secured to the floor before it can be activated!</span>"
to_chat(user, "<span class='warning'>[src] needs to be secured to the floor before it can be activated!</span>")
return FALSE
var/servants = 0
for(var/mob/living/L in living_mob_list)
if(is_servant_of_ratvar(L))
servants++
if(servants * 0.2 < clockwork_daemons)
user << "<span class='nezbere'>\"There are too few servants for this daemon to work.\"</span>"
to_chat(user, "<span class='nezbere'>\"There are too few servants for this daemon to work.\"</span>")
return
if(!clockwork_caches)
user << "<span class='nezbere'>\"You require a cache for this daemon to operate. Get to it.\"</span>"
to_chat(user, "<span class='nezbere'>\"You require a cache for this daemon to operate. Get to it.\"</span>")
return
var/min_power_usable = 0
for(var/i in clockwork_component_cache)
@@ -88,7 +88,7 @@
else
min_power_usable = min(min_power_usable, get_component_cost(i))
if(total_accessable_power() < min_power_usable)
user << "<span class='nezbere'>\"You need more power to activate this daemon, friend.\"</span>"
to_chat(user, "<span class='nezbere'>\"You need more power to activate this daemon, friend.\"</span>")
return
var/choice = alert(user,"Activate Daemon...",,"Specific Component","Random Component","Cancel")
switch(choice)
@@ -105,10 +105,10 @@
if(!is_servant_of_ratvar(user) || !user.canUseTopic(src, !issilicon(user), NO_DEXTERY) || active || !clockwork_caches || servants * 0.2 < clockwork_daemons)
return
if(!component_id_to_produce)
user << "<span class='warning'>You decide not to select a component and activate the daemon.</span>"
to_chat(user, "<span class='warning'>You decide not to select a component and activate the daemon.</span>")
return
if(total_accessable_power() < get_component_cost(component_id_to_produce))
user << "<span class='warning'>There is too little power to produce this type of component!</span>"
to_chat(user, "<span class='warning'>There is too little power to produce this type of component!</span>")
return
toggle(0, user)
if("Random Component")
@@ -130,10 +130,10 @@
component_glow.color = component_color
add_overlay(component_glow)
production_time = world.time + production_cooldown //don't immediately produce when turned on after being off
SetLuminosity(2, 1)
set_light(2, 0.9, get_component_color_bright(component_id_to_produce))
else
cut_overlays()
SetLuminosity(0)
set_light(0)
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/proc/get_component_cost(id)
return max(MIN_CLOCKCULT_POWER*2, (MIN_CLOCKCULT_POWER*2) * (1 + round(clockwork_component_cache[id] * 0.2)))
@@ -30,30 +30,30 @@
return 1
else if(istype(I, /obj/item/weapon/screwdriver))
if(anchored)
user << "<span class='warning'>[src] needs to be unsecured to disassemble it!</span>"
to_chat(user, "<span class='warning'>[src] needs to be unsecured to disassemble it!</span>")
else
playsound(src, I.usesound, 100, 1)
user.visible_message("<span class='warning'>[user] starts to disassemble [src].</span>", "<span class='notice'>You start to disassemble [src]...</span>")
if(do_after(user, 30*I.toolspeed, target = src) && !anchored)
user << "<span class='notice'>You disassemble [src].</span>"
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
deconstruct(TRUE)
return 1
else if(istype(I, /obj/item/stack/tile/brass))
var/obj/item/stack/tile/brass/W = I
if(W.get_amount() < 1)
user << "<span class='warning'>You need one brass sheet to do this!</span>"
to_chat(user, "<span class='warning'>You need one brass sheet to do this!</span>")
return
var/turf/T = get_turf(src)
if(iswallturf(T))
user << "<span class='warning'>There is already a wall present!</span>"
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
return
if(!isfloorturf(T))
user << "<span class='warning'>A floor must be present to build a [anchored ? "false ":""]wall!</span>"
to_chat(user, "<span class='warning'>A floor must be present to build a [anchored ? "false ":""]wall!</span>")
return
if(locate(/obj/structure/falsewall) in T.contents)
user << "<span class='warning'>There is already a false wall present!</span>"
to_chat(user, "<span class='warning'>There is already a false wall present!</span>")
return
user << "<span class='notice'>You start adding [W] to [src]...</span>"
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
if(do_after(user, 20, target = src))
var/brass_floor = FALSE
if(istype(T, /turf/open/floor/clockwork)) //if the floor is already brass, costs less to make(conservation of masssssss)
@@ -66,7 +66,7 @@
new /obj/structure/falsewall/brass(T)
qdel(src)
else
user << "<span class='warning'>You need more brass to make a [anchored ? "false ":""]wall!</span>"
to_chat(user, "<span class='warning'>You need more brass to make a [anchored ? "false ":""]wall!</span>")
return 1
return ..()