Merge pull request #8947 from tigercat2000/more_ss_ports

SS Conversion: Atoms, Machines, n' Mobs
This commit is contained in:
Fox McCloud
2018-05-07 17:54:49 -04:00
committed by GitHub
182 changed files with 763 additions and 571 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
/mob/dead/observer/Life()
/mob/dead/observer/Life(seconds, times_fired)
..()
if(!loc) return
if(!client) return 0
@@ -419,7 +419,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(.)
update_following()
/mob/Life()
/mob/Life(seconds, times_fired)
// to catch teleports etc which directly set loc
update_following()
return ..()
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/humanoid/Life()
/mob/living/carbon/alien/humanoid/Life(seconds, times_fired)
. = ..()
update_icons()
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/larva/Life()
/mob/living/carbon/alien/larva/Life(seconds, times_fired)
if(..()) //still breathing
// GROW!
if(amount_grown < max_grown)
+56 -52
View File
@@ -10,8 +10,12 @@
var/datum/species/species //Contains icon generation and language information, set during New().
var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna = 0)
/mob/living/carbon/human/New(loc)
if(length(args) > 1)
log_runtime(EXCEPTION("human/New called with more than 1 argument (REPORT THIS ENTIRE RUNTIME TO A CODER)"))
. = ..()
/mob/living/carbon/human/Initialize(mapload, new_species = null)
if(!dna)
dna = new /datum/dna(null)
// Species name is handled by set_species()
@@ -40,7 +44,7 @@
faction |= "\ref[M]" //what
// Set up DNA.
if(!delay_ready_dna && dna)
if(dna)
dna.ready_dna(src)
dna.real_name = real_name
sync_organ_dna(1)
@@ -69,80 +73,80 @@
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
/mob/living/carbon/human/skrell/New(var/new_loc)
..(new_loc, "Skrell")
/mob/living/carbon/human/skrell/Initialize(mapload)
..(mapload, "Skrell")
/mob/living/carbon/human/tajaran/New(var/new_loc)
..(new_loc, "Tajaran")
/mob/living/carbon/human/tajaran/Initialize(mapload)
..(mapload, "Tajaran")
/mob/living/carbon/human/vulpkanin/New(var/new_loc)
..(new_loc, "Vulpkanin")
/mob/living/carbon/human/vulpkanin/Initialize(mapload)
..(mapload, "Vulpkanin")
/mob/living/carbon/human/unathi/New(var/new_loc)
..(new_loc, "Unathi")
/mob/living/carbon/human/unathi/Initialize(mapload)
..(mapload, "Unathi")
/mob/living/carbon/human/vox/New(var/new_loc)
..(new_loc, "Vox")
/mob/living/carbon/human/vox/Initialize(mapload)
..(mapload, "Vox")
/mob/living/carbon/human/voxarmalis/New(var/new_loc)
..(new_loc, "Vox Armalis")
/mob/living/carbon/human/voxarmalis/Initialize(mapload)
..(mapload, "Vox Armalis")
/mob/living/carbon/human/skeleton/New(var/new_loc)
..(new_loc, "Skeleton")
/mob/living/carbon/human/skeleton/Initialize(mapload)
..(mapload, "Skeleton")
/mob/living/carbon/human/kidan/New(var/new_loc)
..(new_loc, "Kidan")
/mob/living/carbon/human/kidan/Initialize(mapload)
..(mapload, "Kidan")
/mob/living/carbon/human/plasma/New(var/new_loc)
..(new_loc, "Plasmaman")
/mob/living/carbon/human/plasma/Initialize(mapload)
..(mapload, "Plasmaman")
/mob/living/carbon/human/slime/New(var/new_loc)
..(new_loc, "Slime People")
/mob/living/carbon/human/slime/Initialize(mapload)
..(mapload, "Slime People")
/mob/living/carbon/human/grey/New(var/new_loc)
..(new_loc, "Grey")
/mob/living/carbon/human/grey/Initialize(mapload)
..(mapload, "Grey")
/mob/living/carbon/human/abductor/New(var/new_loc)
..(new_loc, "Abductor")
/mob/living/carbon/human/abductor/Initialize(mapload)
..(mapload, "Abductor")
/mob/living/carbon/human/human/New(var/new_loc)
..(new_loc, "Human")
/mob/living/carbon/human/human/Initialize(mapload)
..(mapload, "Human")
/mob/living/carbon/human/diona/New(var/new_loc)
..(new_loc, "Diona")
/mob/living/carbon/human/diona/Initialize(mapload)
..(mapload, "Diona")
/mob/living/carbon/human/machine/New(var/new_loc)
..(new_loc, "Machine")
/mob/living/carbon/human/machine/Initialize(mapload)
..(mapload, "Machine")
/mob/living/carbon/human/shadow/New(var/new_loc)
..(new_loc, "Shadow")
/mob/living/carbon/human/shadow/Initialize(mapload)
..(mapload, "Shadow")
/mob/living/carbon/human/golem/New(var/new_loc)
..(new_loc, "Golem")
/mob/living/carbon/human/golem/Initialize(mapload)
..(mapload, "Golem")
/mob/living/carbon/human/wryn/New(var/new_loc)
..(new_loc, "Wryn")
/mob/living/carbon/human/wryn/Initialize(mapload)
..(mapload, "Wryn")
/mob/living/carbon/human/nucleation/New(var/new_loc)
..(new_loc, "Nucleation")
/mob/living/carbon/human/nucleation/Initialize(mapload)
..(mapload, "Nucleation")
/mob/living/carbon/human/drask/New(var/new_loc)
..(new_loc, "Drask")
/mob/living/carbon/human/drask/Initialize(mapload)
..(mapload, "Drask")
/mob/living/carbon/human/monkey/New(var/new_loc)
..(new_loc, "Monkey")
/mob/living/carbon/human/monkey/Initialize(mapload)
..(mapload, "Monkey")
/mob/living/carbon/human/farwa/New(var/new_loc)
..(new_loc, "Farwa")
/mob/living/carbon/human/farwa/Initialize(mapload)
..(mapload, "Farwa")
/mob/living/carbon/human/wolpin/New(var/new_loc)
..(new_loc, "Wolpin")
/mob/living/carbon/human/wolpin/Initialize(mapload)
..(mapload, "Wolpin")
/mob/living/carbon/human/neara/New(var/new_loc)
..(new_loc, "Neara")
/mob/living/carbon/human/neara/Initialize(mapload)
..(mapload, "Neara")
/mob/living/carbon/human/stok/New(var/new_loc)
..(new_loc, "Stok")
/mob/living/carbon/human/stok/Initialize(mapload)
..(mapload, "Stok")
/mob/living/carbon/human/Stat()
..()
+4 -5
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/human/Life()
/mob/living/carbon/human/Life(seconds, times_fired)
life_tick++
voice = GetVoice()
@@ -32,7 +32,7 @@
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
pulse = handle_pulse()
pulse = handle_pulse(times_fired)
if(mind && mind.vampire)
mind.vampire.handle_vampire()
@@ -902,9 +902,8 @@
hud_used.lingchemdisplay.invisibility = 101
/mob/living/carbon/human/proc/handle_pulse()
if(mob_master.current_cycle % 5)
/mob/living/carbon/human/proc/handle_pulse(times_fired)
if(times_fired % 5 == 1)
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(NO_BLOOD in species.species_traits)
+8 -8
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/Life()
/mob/living/carbon/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -14,7 +14,7 @@
O.on_life()
handle_changeling()
handle_wetness()
handle_wetness(times_fired)
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
@@ -26,8 +26,8 @@
///////////////
//Start of a breath chain, calls breathe()
/mob/living/carbon/handle_breathing()
if(mob_master.current_cycle % 4 == 2 || failed_last_breath)
/mob/living/carbon/handle_breathing(times_fired)
if(times_fired % 4 == 2 || failed_last_breath)
breathe() //Breathe per 4 ticks, unless suffocating
else
if(istype(loc, /obj/))
@@ -241,11 +241,11 @@
reagents.metabolize(src)
/mob/living/carbon/proc/handle_wetness()
if(mob_master.current_cycle%20==2) //dry off a bit once every 20 ticks or so
/mob/living/carbon/proc/handle_wetness(times_fired)
if(times_fired % 20==2) //dry off a bit once every 20 ticks or so
wetlevel = max(wetlevel - 1,0)
/mob/living/carbon/handle_stomach()
/mob/living/carbon/handle_stomach(times_fired)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
@@ -255,7 +255,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
if(mob_master.current_cycle%3==1)
if(times_fired % 3 == 1)
M.adjustBruteLoss(5)
nutrition += 10
+1 -1
View File
@@ -5,7 +5,7 @@
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
/mob/living/carbon/slime/Life()
/mob/living/carbon/slime/Life(seconds, times_fired)
if(..())
handle_nutrition()
handle_targets()
+5 -5
View File
@@ -1,4 +1,4 @@
/mob/living/Life()
/mob/living/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -22,7 +22,7 @@
handle_mutations_and_radiation()
//Breathing, if applicable
handle_breathing()
handle_breathing(times_fired)
//Random events (vomiting etc)
handle_random_events()
@@ -38,7 +38,7 @@
handle_fire()
//stuff in the stomach
handle_stomach()
handle_stomach(times_fired)
update_gravity(mob_has_gravity())
@@ -61,7 +61,7 @@
..()
/mob/living/proc/handle_breathing()
/mob/living/proc/handle_breathing(times_fired)
return
/mob/living/proc/handle_mutations_and_radiation()
@@ -80,7 +80,7 @@
/mob/living/proc/handle_environment(datum/gas_mixture/environment)
return
/mob/living/proc/handle_stomach()
/mob/living/proc/handle_stomach(times_fired)
return
/mob/living/proc/update_pulling()
+1 -1
View File
@@ -3,7 +3,7 @@
#define POWER_RESTORATION_SEARCH_APC 2
#define POWER_RESTORATION_APC_FOUND 3
/mob/living/silicon/ai/Life()
/mob/living/silicon/ai/Life(seconds, times_fired)
//doesn't call parent because it's a horrible mess
if(stat == DEAD)
return
@@ -1,4 +1,4 @@
/mob/living/silicon/decoy/Life()
/mob/living/silicon/decoy/Life(seconds, times_fired)
if(src.stat == 2)
return
else
+1 -1
View File
@@ -1,4 +1,4 @@
/mob/living/silicon/pai/Life()
/mob/living/silicon/pai/Life(seconds, times_fired)
. = ..()
if(.)
//if(secHUD == 1)
@@ -1,4 +1,4 @@
/mob/living/silicon/robot/Life()
/mob/living/silicon/robot/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -267,7 +267,7 @@ Auto Patrol: []"},
C.visible_message("<span class='danger'>[src] has [harmbaton ? "beaten" : "stunned"] [C]!</span>",\
"<span class='userdanger'>[src] has [harmbaton ? "beaten" : "stunned"] you!</span>")
/mob/living/simple_animal/bot/secbot/Life()
/mob/living/simple_animal/bot/secbot/Life(seconds, times_fired)
. = ..()
if(flashing_lights)
switch(light_color)
@@ -285,7 +285,7 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/mob/living/simple_animal/hostile/construct/behemoth/Life()
/mob/living/simple_animal/hostile/construct/behemoth/Life(seconds, times_fired)
weakened = 0
return ..()
@@ -46,7 +46,7 @@
Read_Memory()
..()
/mob/living/simple_animal/pet/cat/Runtime/Life()
/mob/living/simple_animal/pet/cat/Runtime/Life(seconds, times_fired)
if(!cats_deployed && ticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && ticker.current_state == GAME_STATE_FINISHED && !memory_saved)
@@ -37,7 +37,7 @@
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
/mob/living/simple_animal/pet/corgi/Life()
/mob/living/simple_animal/pet/corgi/Life(seconds, times_fired)
. = ..()
regenerate_icons()
@@ -612,7 +612,7 @@
A.fire()
return
/mob/living/simple_animal/pet/corgi/Ian/borgi/Life()
/mob/living/simple_animal/pet/corgi/Ian/borgi/Life(seconds, times_fired)
..()
if(emagged && prob(25))
var/mob/living/carbon/target = locate() in view(10,src)
@@ -34,7 +34,7 @@
Move(get_step(src, east_vs_west), east_vs_west)
turns_since_move = 0
/mob/living/simple_animal/crab/Life()
/mob/living/simple_animal/crab/Life(seconds, times_fired)
. = ..()
regenerate_icons()
@@ -52,7 +52,7 @@
if(SV)
SV.eat(src)
/mob/living/simple_animal/hostile/retaliate/goat/Life()
/mob/living/simple_animal/hostile/retaliate/goat/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -132,7 +132,7 @@
else
..()
/mob/living/simple_animal/cow/Life()
/mob/living/simple_animal/cow/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -188,7 +188,7 @@
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
/mob/living/simple_animal/chick/Life()
/mob/living/simple_animal/chick/Life(seconds, times_fired)
. =..()
if(.)
amount_grown += rand(1,2)
@@ -267,7 +267,7 @@ var/global/chicken_count = 0
else
..()
/mob/living/simple_animal/chicken/Life()
/mob/living/simple_animal/chicken/Life(seconds, times_fired)
. = ..()
if((. && prob(3) && eggsleft > 0) && egg_type)
visible_message("[src] [pick(layMessage)]")
@@ -39,7 +39,7 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
/mob/living/simple_animal/mouse/Life()
/mob/living/simple_animal/mouse/Life(seconds, times_fired)
. = ..()
if(stat == UNCONSCIOUS)
if(ckey || prob(1))
@@ -57,7 +57,7 @@
target = null
return ..()
/mob/living/simple_animal/hostile/Life()
/mob/living/simple_animal/hostile/Life(seconds, times_fired)
. = ..()
if(!.)
walk(src, 0)
@@ -75,7 +75,7 @@ Difficulty: Hard
/obj/effect/decal/cleanable/blood/gibs/bubblegum/can_bloodcrawl_in()
return TRUE
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life(seconds, times_fired)
..()
move_to_delay = Clamp((health/maxHealth) * 10, 5, 10)
@@ -76,7 +76,7 @@ Difficulty: Hard
internal_gps = new/obj/item/gps/internal/hierophant(src)
spawned_rune = new(loc)
/mob/living/simple_animal/hostile/megafauna/hierophant/Life()
/mob/living/simple_animal/hostile/megafauna/hierophant/Life(seconds, times_fired)
. = ..()
if(. && spawned_rune && !client)
if(target || loc == spawned_rune.loc)
@@ -51,7 +51,7 @@
var/attempt_open = 0
// Pickup loot
/mob/living/simple_animal/hostile/mimic/crate/initialize()
/mob/living/simple_animal/hostile/mimic/crate/Initialize()
..()
for(var/obj/item/I in loc)
I.loc = src
@@ -269,7 +269,7 @@
stat_attack = 1
robust_searching = 1
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life()
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(seconds, times_fired)
if(isturf(loc))
for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile
if(H.stat == UNCONSCIOUS)
@@ -42,7 +42,7 @@
else
to_chat(user, "<span class='info'>It looks like it's been roughed up.</span>")
/mob/living/simple_animal/hostile/mushroom/Life()
/mob/living/simple_animal/hostile/mushroom/Life(seconds, times_fired)
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)
@@ -62,7 +62,7 @@
return ..()
//self repair systems have a chance to bring the drone back to life
/mob/living/simple_animal/hostile/retaliate/malf_drone/Life()
/mob/living/simple_animal/hostile/retaliate/malf_drone/Life(seconds, times_fired)
//emps and lots of damage can temporarily shut us down
if(disabled > 0)
@@ -56,7 +56,7 @@
if(.)
custom_emote(1, "wails at [.]")
/mob/living/simple_animal/hostile/retaliate/ghost/Life()
/mob/living/simple_animal/hostile/retaliate/ghost/Life(seconds, times_fired)
if(target)
invisibility = pick(0,0,60,invisibility)
else
@@ -190,7 +190,7 @@
SW.death()
/mob/living/simple_animal/hostile/spaceWorm/Life()
/mob/living/simple_animal/hostile/spaceWorm/Life(seconds, times_fired)
if(nextWorm && !(Adjacent(nextWorm)))
Detach(0)
@@ -48,7 +48,7 @@
visible_message("<span class='notice'>[src] chitters in the direction of [Q]!</span>")
. = ..()
/mob/living/simple_animal/hostile/poison/terror_spider/purple/Life()
/mob/living/simple_animal/hostile/poison/terror_spider/purple/Life(seconds, times_fired)
. = ..()
if(.) // if mob is NOT dead
if(!degenerate && spider_myqueen)
@@ -61,7 +61,7 @@
spider_growinstantly = 1
spider_spawnfrequency = 150
/mob/living/simple_animal/hostile/poison/terror_spider/queen/Life()
/mob/living/simple_animal/hostile/poison/terror_spider/queen/Life(seconds, times_fired)
. = ..()
if(.) // if mob is NOT dead
if(ckey && canlay < 12 && hasnested) // max 12 eggs worth stored at any one time, realistically that's tons.
@@ -292,7 +292,7 @@ var/global/list/ts_spiderling_list = list()
handle_dying()
return ..()
/mob/living/simple_animal/hostile/poison/terror_spider/Life()
/mob/living/simple_animal/hostile/poison/terror_spider/Life(seconds, times_fired)
. = ..()
if(!.) // if mob is dead
if(prob(2))
@@ -276,7 +276,7 @@
/*
* AI - Not really intelligent, but I'm calling it AI anyway.
*/
/mob/living/simple_animal/parrot/Life()
/mob/living/simple_animal/parrot/Life(seconds, times_fired)
..()
//Sprite and AI update for when a parrot gets pulled
@@ -60,7 +60,7 @@
qdel(src)
/mob/living/simple_animal/possessed_object/Life()
/mob/living/simple_animal/possessed_object/Life(seconds, times_fired)
..()
if(!possessed_item) // If we're a donut and someone's eaten us, for instance.
@@ -68,7 +68,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
gestation = 0
/mob/living/simple_animal/tribble/Life()
/mob/living/simple_animal/tribble/Life(seconds, times_fired)
..()
if(src.health > 0) //no mostly dead procreation
if(gestation != null) //neuter check
+1 -1
View File
@@ -169,7 +169,7 @@
/mob/proc/movement_delay()
return 0
/mob/proc/Life()
/mob/proc/Life(seconds, times_fired)
// handle_typing_indicator()
return