Clockwork stuff uses Initialize (#426)

This commit is contained in:
CitadelStationBot
2017-04-16 17:15:48 -05:00
committed by TalkingCactus
parent 64068fc614
commit 6591075c5e
24 changed files with 59 additions and 72 deletions
@@ -10,8 +10,8 @@
opacity = 0
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/clockwork/New()
..()
/obj/effect/clockwork/Initialize()
. = ..()
GLOB.all_clockwork_objects += src
/obj/effect/clockwork/Destroy()
@@ -26,15 +26,14 @@
smooth = SMOOTH_TRUE
layer = CLOSED_TURF_LAYER
/obj/effect/clockwork/overlay/wall/New()
..()
/obj/effect/clockwork/overlay/wall/Initialize()
. = ..()
queue_smooth_neighbors(src)
addtimer(CALLBACK(GLOBAL_PROC, .proc/queue_smooth, src), 1)
/obj/effect/clockwork/overlay/wall/Destroy()
queue_smooth_neighbors(src)
..()
return QDEL_HINT_QUEUE
return ..()
/obj/effect/clockwork/overlay/floor
icon = 'icons/turf/floors.dmi'
+2 -2
View File
@@ -8,8 +8,8 @@
icon_state = "rare_pepe"
w_class = WEIGHT_CLASS_SMALL
/obj/item/clockwork/New()
..()
/obj/item/clockwork/Initialize()
. = ..()
ratvar_act()
GLOB.all_clockwork_objects += src
@@ -57,10 +57,6 @@
light_power = 0.4
light_color = "#F42B9D"
/obj/item/clockwork/component/belligerent_eye/lens_gem/New()
..()
update_light()
/obj/item/clockwork/component/vanguard_cogwheel
name = "vanguard cogwheel"
desc = "A sturdy brass cog with a faintly glowing blue gem in its center."
@@ -167,8 +163,8 @@
var/randomsinglesprite = FALSE
var/randomspritemax = 2
/obj/item/clockwork/alloy_shards/New()
..()
/obj/item/clockwork/alloy_shards/Initialize()
. = ..()
if(randomsinglesprite)
replace_name_desc()
icon_state = "[icon_state][rand(1, randomspritemax)]"
@@ -8,8 +8,8 @@
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()
..()
/obj/item/clothing/head/helmet/clockwork/Initialize()
. = ..()
ratvar_act()
GLOB.all_clockwork_objects += src
@@ -64,8 +64,8 @@
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()
..()
/obj/item/clothing/suit/armor/clockwork/Initialize()
. = ..()
ratvar_act()
GLOB.all_clockwork_objects += src
@@ -125,8 +125,8 @@
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()
..()
/obj/item/clothing/gloves/clockwork/Initialize()
. = ..()
ratvar_act()
GLOB.all_clockwork_objects += src
@@ -178,8 +178,8 @@
put_on_delay = 30
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/clothing/shoes/clockwork/New()
..()
/obj/item/clothing/shoes/clockwork/Initialize()
. = ..()
ratvar_act()
GLOB.all_clockwork_objects += src
@@ -88,8 +88,8 @@
amount -= MIN_CLOCKCULT_POWER
. = ..()
/obj/item/clockwork/clockwork_proselytizer/New()
..()
/obj/item/clockwork/clockwork_proselytizer/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/clockwork/clockwork_proselytizer/Destroy()
@@ -93,8 +93,8 @@
if(!GLOB.ratvar_awakens)
SStgui.close_uis(src)
/obj/item/clockwork/slab/New()
..()
/obj/item/clockwork/slab/Initialize()
. = ..()
update_slab_info(src)
START_PROCESSING(SSobj, src)
production_time = world.time + SLAB_PRODUCTION_TIME
@@ -13,8 +13,8 @@
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()
..()
/obj/item/clothing/glasses/judicial_visor/Initialize()
. = ..()
GLOB.all_clockwork_objects += src
blaster = new(src)
blaster.visor = src
@@ -156,8 +156,8 @@
layer = BELOW_MOB_LAYER
var/mob/user
/obj/effect/clockwork/judicial_marker/New(loc, caster)
..()
/obj/effect/clockwork/judicial_marker/Initialize(mapload, caster)
. = ..()
set_light(1.4, 2, "#FE9C11")
user = caster
INVOKE_ASYNC(src, .proc/judicialblast)
@@ -16,10 +16,6 @@
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 ..()
@@ -24,7 +24,7 @@
force_replace_ai_name = TRUE
/obj/item/device/mmi/posibrain/soul_vessel/Initialize()
..()
. = ..()
radio.on = FALSE
laws = new /datum/ai_laws/ratvar()
braintype = picked_name
@@ -12,8 +12,8 @@
visor_vars_to_toggle = NONE //we don't actually toggle anything we just set it
tint = 3 //this'll get reset, but it won't handle vision updates properly otherwise
/obj/item/clothing/glasses/wraith_spectacles/New()
..()
/obj/item/clothing/glasses/wraith_spectacles/Initialize()
. = ..()
GLOB.all_clockwork_objects += src
/obj/item/clothing/glasses/wraith_spectacles/Destroy()
@@ -13,6 +13,8 @@
loot = list(/obj/item/clockwork/component/replicant_alloy/smashed_anima_fragment)
weather_immunities = list("lava")
movement_type = FLYING
light_range = 2
light_power = 0.8
playstyle_string = "<span class='heavy_brass'>You are an anima fragment</span><b>, a clockwork creation of Ratvar. As a fragment, you have decent health that very gradually regenerates, do \
decent damage, and move at extreme speed in addition to being immune to extreme temperatures and pressures. Taking damage, and slamming into non-Servants, will temporarily slow you down, however.\n\
Your goal is to serve the Justiciar and his servants in any way you can. You yourself are one of these servants, and will be able to utilize anything they can, assuming it doesn't require \
@@ -20,8 +22,7 @@
var/movement_delay_time //how long the fragment is slowed after being hit
/mob/living/simple_animal/hostile/clockwork/fragment/Initialize()
..()
set_light(2, 0.8)
. = ..()
if(prob(1))
name = "anime fragment"
desc = "I-it's not like I want to show you the light of the Justiciar or anything, B-BAKA!"
@@ -21,6 +21,8 @@
var/blockchance = 17 //chance to block attacks entirely
var/counterchance = 30 //chance to counterattack after blocking
var/static/list/damage_heal_order = list(OXY, BURN, BRUTE, TOX) //we heal our host's damage in this order
light_range = 2
light_power = 1.1
playstyle_string = "<span class='sevtug'>You are a clockwork marauder</span><b>, a living extension of Sevtug's will. As a marauder, you are somewhat slow, but may block attacks, \
and have a chance to also counter blocked melee attacks for extra damage, in addition to being immune to extreme temperatures and pressures. \
Your primary goal is to serve the creature that you are now a part of. You can use <span class='sevtug_small'><i>:b</i></span> to communicate silently with your master, \
@@ -30,9 +32,8 @@
fighting safely. As a final note, you should probably avoid harming any fellow servants of Ratvar.</span>"
/mob/living/simple_animal/hostile/clockwork/marauder/Initialize()
..()
. = ..()
true_name = pick(possible_true_names)
set_light(2, 1.1)
/mob/living/simple_animal/hostile/clockwork/marauder/Life()
..()
@@ -18,8 +18,8 @@
var/construction_value = 0 //How much value the structure contributes to the overall "power" of the structures on the station
var/immune_to_servant_attacks = FALSE //if we ignore attacks from servants of ratvar instead of taking damage
/obj/structure/destructible/clockwork/New()
..()
/obj/structure/destructible/clockwork/Initialize()
. = ..()
change_construction_value(construction_value)
GLOB.all_clockwork_objects += src
@@ -142,8 +142,8 @@
density = FALSE
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/structure/destructible/clockwork/massive/New()
..()
/obj/structure/destructible/clockwork/massive/Initialize()
. = ..()
GLOB.poi_list += src
/obj/structure/destructible/clockwork/massive/Destroy()
@@ -23,8 +23,8 @@
var/obj/effect/countdown/clockworkgate/countdown
var/list/required_components = list(BELLIGERENT_EYE = ARK_CONSUME_COST, VANGUARD_COGWHEEL = ARK_CONSUME_COST, GEIS_CAPACITOR = ARK_CONSUME_COST, REPLICANT_ALLOY = ARK_CONSUME_COST, HIEROPHANT_ANSIBLE = ARK_CONSUME_COST)
/obj/structure/destructible/clockwork/massive/celestial_gateway/New()
..()
/obj/structure/destructible/clockwork/massive/celestial_gateway/Initialize()
. = ..()
INVOKE_ASYNC(src, .proc/spawn_animation)
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/spawn_animation()
@@ -291,7 +291,3 @@
light_range = 2
light_power = 4
light_color = "#6A4D2F"
/obj/effect/clockwork/overlay/gateway_glow/New()
..()
update_light()
@@ -17,8 +17,8 @@
var/hierophant_cost = MIN_CLOCKCULT_POWER //how much it costs to broadcast with large text
var/gateway_cost = 2000 //how much it costs to open a gateway
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/New()
..()
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/Initialize()
. = ..()
toggle(1)
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/examine(mob/user)
@@ -5,6 +5,8 @@
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_range = 2
light_power = 0.5
light_color = "#AF0AAF"
density = FALSE
immune_to_servant_attacks = TRUE
@@ -20,10 +22,6 @@
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"
..()
@@ -20,7 +20,7 @@
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/Initialize()
..()
. = ..()
update_current_glow()
/obj/structure/destructible/clockwork/powered/interdiction_lens/examine(mob/user)
@@ -17,8 +17,8 @@
var/atom/movable/target
var/list/idle_messages = list(" sulkily glares around.", " lazily drifts from side to side.", " looks around for something to burn.", " slowly turns in circles.")
/obj/structure/destructible/clockwork/ocular_warden/New()
..()
/obj/structure/destructible/clockwork/ocular_warden/Initialize()
. = ..()
START_PROCESSING(SSfastprocess, src)
/obj/structure/destructible/clockwork/ocular_warden/Destroy()
@@ -11,14 +11,14 @@
appearance_flags = 0
light_power = 0.7
light_range = 15
light_color = rgb(190, 135, 0)
light_color = "#BE8700"
var/atom/prey //Whatever Ratvar is chasing
var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE
var/proselytize_range = 10
dangerous_possession = TRUE
/obj/structure/destructible/clockwork/massive/ratvar/New()
..()
/obj/structure/destructible/clockwork/massive/ratvar/Initialize()
. = ..()
GLOB.ratvar_awakens++
for(var/obj/O in GLOB.all_clockwork_objects)
O.ratvar_act()
@@ -15,8 +15,8 @@
debris = list()
var/timerid
/obj/structure/destructible/clockwork/taunting_trail/New()
..()
/obj/structure/destructible/clockwork/taunting_trail/Initialize()
. = ..()
timerid = QDEL_IN(src, 15)
var/obj/structure/destructible/clockwork/taunting_trail/Tt = locate(/obj/structure/destructible/clockwork/taunting_trail) in loc
if(Tt && Tt != src)
@@ -27,7 +27,7 @@
if(TT != src)
qdel(TT)
setDir(pick(GLOB.cardinal))
transform = matrix()*1.25
transform = matrix()*1.3
animate(src, alpha = 100, time = 15)
/obj/structure/destructible/clockwork/taunting_trail/Destroy()
@@ -15,8 +15,8 @@
var/turf/closed/wall/clockwork/linkedwall //if we've got a linked wall and are producing
var/static/linked_caches = 0 //how many caches are linked to walls; affects how fast components are produced
/obj/structure/destructible/clockwork/cache/New()
..()
/obj/structure/destructible/clockwork/cache/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
GLOB.clockwork_caches++
update_slab_info()
@@ -20,8 +20,8 @@
var/production_time = 0 //last time we produced a component
var/production_cooldown = 120
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/New()
..()
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/Initialize()
. = ..()
GLOB.clockwork_daemons++
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/Destroy()
@@ -17,8 +17,8 @@
/obj/structure/destructible/clockwork/wall_gear/displaced
anchored = FALSE
/obj/structure/destructible/clockwork/wall_gear/New()
..()
/obj/structure/destructible/clockwork/wall_gear/Initialize()
. = ..()
new /obj/effect/overlay/temp/ratvar/gear(get_turf(src))
/obj/structure/destructible/clockwork/wall_gear/emp_act(severity)