[MIRROR] Cleans up some Initializes (#943)

* Cleans up some Initializes

* Update farm_animals.dm

* Delete farm_animals.dm.rej

* Update farm_animals.dm
This commit is contained in:
CitadelStationBot
2017-05-18 11:13:53 -05:00
committed by Poojawa
parent 620b756025
commit c61bb0476f
11 changed files with 340 additions and 351 deletions

View File

@@ -6,7 +6,7 @@
INITIALIZE_IMMEDIATE(/obj/effect/statclick)
/obj/effect/statclick/Initialize(mapload, text, target) //Don't port this to Initialize it's too critical
..()
. = ..()
name = text
src.target = target

View File

@@ -45,13 +45,6 @@
remove_radio(src, frequency)
frequency = add_radio(src, new_frequency)
/obj/item/device/radio/New()
wires = new /datum/wires/radio(src)
if(prison_radio)
wires.cut(WIRE_TX) // OH GOD WHY
secure_radio_connections = new
..()
/obj/item/device/radio/proc/recalculateChannels()
channels = list()
translate_binary = 0
@@ -92,7 +85,11 @@
return ..()
/obj/item/device/radio/Initialize()
..()
wires = new /datum/wires/radio(src)
if(prison_radio)
wires.cut(WIRE_TX) // OH GOD WHY
secure_radio_connections = new
. = ..()
frequency = sanitize_frequency(frequency, freerange)
set_frequency(frequency)
@@ -296,6 +293,7 @@
// --- Cold, emotionless machines. ---
else if(isobj(M))
jobname = "Machine"
voice = capitalize(voice)
// --- Unidentifiable mob ---
else

View File

@@ -502,7 +502,7 @@
/obj/item/weapon/storage/Initialize(mapload)
..()
. = ..()
can_hold = typecacheof(can_hold)
cant_hold = typecacheof(cant_hold)

View File

@@ -30,7 +30,7 @@
initial_gas_mix = "o2=14;n2=23;TEMP=300"
/turf/open/indestructible/necropolis/Initialize()
..()
. = ..()
if(prob(12))
icon_state = "necro[rand(2,3)]"

View File

@@ -431,9 +431,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/obj/effect/statclick/ahelp
var/datum/admin_help/ahelp_datum
/obj/effect/statclick/ahelp/New(loc, datum/admin_help/AH)
/obj/effect/statclick/ahelp/Initialize(mapload, datum/admin_help/AH)
ahelp_datum = AH
..(loc)
. = ..()
/obj/effect/statclick/ahelp/update()
return ..(ahelp_datum.name)

View File

@@ -39,7 +39,7 @@
if(!blocks_air)
air = new
air.copy_from_turf(src)
..()
. = ..()
/turf/open/Destroy()
if(active_hotspot)

View File

@@ -797,7 +797,7 @@ Pass a positive integer as an argument to override a bot's default speed.
var/mob/living/simple_animal/bot/owner = null
/obj/machinery/bot_core/Initialize()
..()
. = ..()
owner = loc
if(!istype(owner))
qdel(src)

View File

@@ -32,7 +32,8 @@
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
udder = new()
..()
. = ..()
/mob/living/simple_animal/hostile/retaliate/goat/Destroy()
qdel(udder)
udder = null
@@ -51,12 +52,14 @@
src.visible_message("<span class='notice'>[src] calms down.</span>")
if(stat == CONSCIOUS)
udder.generateMilk()
eat_plants()
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
SV.eat(src)
if(!pulledby)
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
var/step = get_step(src, direction)
if(step)
if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
if(locate(/obj/structure/spacevine) in step)
Move(step, get_dir(src, step))
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
@@ -66,22 +69,9 @@
/mob/living/simple_animal/hostile/retaliate/goat/Move()
..()
if(!stat)
eat_plants()
/mob/living/simple_animal/hostile/retaliate/goat/proc/eat_plants()
var/eaten = FALSE
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
SV.eat(src)
eaten = TRUE
var/obj/structure/glowshroom/GS = locate(/obj/structure/glowshroom) in loc
if(GS)
qdel(GS)
eaten = TRUE
if(eaten && prob(10))
say("Nom")
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O, mob/user, params)
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
@@ -121,7 +111,7 @@
/mob/living/simple_animal/cow/Initialize()
udder = new()
..()
. = ..()
/mob/living/simple_animal/cow/Destroy()
qdel(udder)
@@ -196,7 +186,7 @@
devourable = TRUE
/mob/living/simple_animal/chick/Initialize()
..()
. = ..()
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
@@ -252,7 +242,7 @@
devourable = TRUE
/mob/living/simple_animal/chicken/Initialize()
..()
. = ..()
if(!body_color)
body_color = pick(validColors)
icon_state = "[icon_prefix]_[body_color]"
@@ -311,9 +301,10 @@
name = "udder"
/obj/item/udder/Initialize()
create_reagents(50)
reagents = new(50)
reagents.my_atom = src
reagents.add_reagent("milk", 20)
..()
. = ..()
/obj/item/udder/proc/generateMilk()
if(prob(5))

View File

@@ -55,7 +55,7 @@
/mob/living/simple_animal/hostile/Initialize()
..()
. = ..()
if(!targets_from)
targets_from = src

View File

@@ -86,7 +86,7 @@
var/tame = 0
/mob/living/simple_animal/Initialize()
..()
. = ..()
GLOB.simple_animals += src
handcrafting = new()
if(gender == PLURAL)

View File

@@ -36,7 +36,7 @@
continue
var/datum/atom_hud/alternate_appearance/AA = v
AA.onNewMob(src)
..()
. = ..()
/atom/proc/prepare_huds()
hud_list = list()