April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
+78 -49
View File
@@ -69,7 +69,6 @@
/obj/structure/alien/resin/New(location)
..()
air_update_turf(1)
return
/obj/structure/alien/resin/Move()
var/turf/T = loc
@@ -127,15 +126,20 @@
var/last_expand = 0 //last world.time this weed expanded
var/growth_cooldown_low = 150
var/growth_cooldown_high = 200
var/static/list/blacklisted_turfs = typecacheof(list(
/turf/open/space,
/turf/open/chasm,
/turf/open/floor/plating/lava))
var/static/list/blacklisted_turfs
/obj/structure/alien/weeds/New()
/obj/structure/alien/weeds/Initialize()
pixel_x = -4
pixel_y = -4 //so the sprites line up right in the map editor
..()
if(!blacklisted_turfs)
blacklisted_turfs = typecacheof(list(
/turf/open/space,
/turf/open/chasm,
/turf/open/floor/plating/lava))
last_expand = world.time + rand(growth_cooldown_low, growth_cooldown_high)
if(icon == initial(icon))
switch(rand(1,3))
@@ -171,12 +175,15 @@
name = "glowing resin"
desc = "Blue bioluminescence shines from beneath the surface."
icon_state = "weednode"
light_range = 1
light_color = LIGHT_COLOR_BLUE
light_power = 0.5
var/lon_range = 4
var/node_range = NODERANGE
/obj/structure/alien/weeds/node/New()
/obj/structure/alien/weeds/node/Initialize()
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
..()
set_light(lon_range)
var/obj/structure/alien/weeds/W = locate(/obj/structure/alien/weeds) in loc
if(W && W != src)
qdel(W)
@@ -200,39 +207,58 @@
*/
//for the status var
#define BURST 0
#define BURSTING 1
#define GROWING 2
#define GROWN 3
#define BURST "burst"
#define GROWING "growing"
#define GROWN "grown"
#define MIN_GROWTH_TIME 900 //time it takes to grow a hugger
#define MAX_GROWTH_TIME 1500
/obj/structure/alien/egg
name = "egg"
desc = "A large mottled egg."
var/base_icon = "egg"
icon_state = "egg_growing"
density = 0
anchored = 1
density = FALSE
anchored = TRUE
obj_integrity = 100
max_integrity = 100
integrity_failure = 5
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
layer = MOB_LAYER
var/obj/item/clothing/mask/facehugger/child
/obj/structure/alien/egg/New()
new /obj/item/clothing/mask/facehugger(src)
/obj/structure/alien/egg/Initialize(mapload)
..()
addtimer(CALLBACK(src, .proc/Grow), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
update_icon()
if(status == GROWING || status == GROWN)
child = new(src)
if(status == GROWING)
addtimer(CALLBACK(src, .proc/Grow), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
if(status == GROWN)
add_to_proximity_list(src, 1)
if(status == BURST)
obj_integrity = integrity_failure
/obj/structure/alien/egg/Destroy()
remove_from_proximity_list(src, 1)
return ..()
. = ..()
/obj/structure/alien/egg/update_icon()
..()
switch(status)
if(GROWING)
icon_state = "[base_icon]_growing"
if(GROWN)
icon_state = "[base_icon]"
if(BURST)
icon_state = "[base_icon]_hatched"
/obj/structure/alien/egg/attack_paw(mob/living/user)
return attack_hand(user)
. = attack_hand(user)
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
return attack_hand(user)
. = attack_hand(user)
/obj/structure/alien/egg/attack_hand(mob/living/user)
if(user.getorgan(/obj/item/organ/alien/plasmavessel))
@@ -247,39 +273,39 @@
return
if(GROWN)
to_chat(user, "<span class='notice'>You retrieve the child.</span>")
Burst(0)
Burst(kill=FALSE)
return
else
to_chat(user, "<span class='notice'>It feels slimy.</span>")
user.changeNext_move(CLICK_CD_MELEE)
/obj/structure/alien/egg/proc/GetFacehugger()
return locate(/obj/item/clothing/mask/facehugger) in contents
/obj/structure/alien/egg/proc/Grow()
icon_state = "egg"
status = GROWN
update_icon()
add_to_proximity_list(src, 1)
/obj/structure/alien/egg/proc/Burst(kill = 1) //drops and kills the hugger if any is remaining
//drops and kills the hugger if any is remaining
/obj/structure/alien/egg/proc/Burst(kill = TRUE)
if(status == GROWN || status == GROWING)
remove_from_proximity_list(src, 1)
icon_state = "egg_hatched"
status = BURST
update_icon()
flick("egg_opening", src)
status = BURSTING
spawn(15)
status = BURST
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
if(child)
child.loc = get_turf(src)
if(kill && istype(child))
child.Die()
else
for(var/mob/M in range(1,src))
if(CanHug(M))
child.Attach(M)
break
addtimer(CALLBACK(src, .proc/finish_bursting, kill), 15)
/obj/structure/alien/egg/proc/finish_bursting(kill = TRUE)
if(child)
child.forceMove(get_turf(src))
// TECHNICALLY you could put non-facehuggers in the child var
if(istype(child))
if(kill)
child.Die()
else
for(var/mob/M in range(1,src))
if(CanHug(M))
child.Attach(M)
break
/obj/structure/alien/egg/Moved(oldloc)
remove_from_proximity_list(oldloc, 1)
@@ -287,14 +313,10 @@
add_to_proximity_list(src, 1)
return ..()
/obj/structure/alien/egg/deconstruct()
/obj/structure/alien/egg/obj_break(damage_flag)
if(!(flags & NODECONSTRUCT))
if(status != BURST && status != BURSTING)
Burst()
else if(status == BURST)
qdel(src) //Remove the egg after it has been hit after bursting.
else
qdel(src)
if(status != BURST)
Burst(kill=TRUE)
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
@@ -310,10 +332,17 @@
if(C.stat == CONSCIOUS && C.getorgan(/obj/item/organ/body_egg/alien_embryo))
return
Burst(0)
Burst(kill=FALSE)
/obj/structure/alien/egg/grown
status = GROWN
icon_state = "egg"
/obj/structure/alien/egg/burst
status = BURST
icon_state = "egg_hatched"
#undef BURST
#undef BURSTING
#undef GROWING
#undef GROWN
#undef MIN_GROWTH_TIME