mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge branch 'CHOMPStation2:master' into upstream-merge-11163
This commit is contained in:
@@ -54,6 +54,10 @@
|
||||
if(!can_buckle_check(M, forced))
|
||||
return FALSE
|
||||
|
||||
if(M == src)
|
||||
stack_trace("Recursive buckle warning: [M] being buckled to self.")
|
||||
return
|
||||
|
||||
M.buckled = src
|
||||
M.facing_dir = null
|
||||
M.set_dir(buckle_dir ? buckle_dir : dir)
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
layer = ABOVE_TURF_LAYER+0.01
|
||||
light_range = NODERANGE
|
||||
light_on = TRUE
|
||||
light_color = "#673972"
|
||||
|
||||
var/node_range = NODERANGE
|
||||
var/set_color = "#321D37"
|
||||
@@ -420,5 +421,3 @@
|
||||
if(0 to 1)
|
||||
visible_message("<span class='alium'>[src.target] begins to crumble under the acid!</span>")
|
||||
spawn(rand(150, 200)) tick()
|
||||
|
||||
//CHOMPedit old eggs removed
|
||||
|
||||
@@ -123,6 +123,15 @@
|
||||
else
|
||||
log_error("[type] mapped in but no using_map")
|
||||
|
||||
/obj/effect/landmark/hidden_level
|
||||
delete_me = 1
|
||||
/obj/effect/landmark/hidden_level/Initialize()
|
||||
. = ..()
|
||||
if(using_map)
|
||||
using_map.hidden_levels |= z
|
||||
else
|
||||
log_error("[type] mapped in but no using_map")
|
||||
|
||||
|
||||
/obj/effect/landmark/virtual_reality
|
||||
name = "virtual_reality"
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
/obj/random/multiple/ore_pile/item_to_spawn()
|
||||
return pick(
|
||||
prob(10);list(
|
||||
/*prob(10);list(
|
||||
/obj/item/weapon/ore/bauxite,
|
||||
/obj/item/weapon/ore/bauxite,
|
||||
/obj/item/weapon/ore/bauxite,
|
||||
@@ -475,7 +475,7 @@
|
||||
/obj/item/weapon/ore/bauxite,
|
||||
/obj/item/weapon/ore/bauxite,
|
||||
/obj/item/weapon/ore/bauxite
|
||||
),
|
||||
),*/
|
||||
prob(10);list(
|
||||
/obj/item/weapon/ore/coal,
|
||||
/obj/item/weapon/ore/coal,
|
||||
@@ -488,7 +488,7 @@
|
||||
/obj/item/weapon/ore/coal,
|
||||
/obj/item/weapon/ore/coal
|
||||
),
|
||||
prob(10);list(
|
||||
/*prob(10);list(
|
||||
/obj/item/weapon/ore/copper,
|
||||
/obj/item/weapon/ore/copper,
|
||||
/obj/item/weapon/ore/copper,
|
||||
@@ -499,7 +499,7 @@
|
||||
/obj/item/weapon/ore/copper,
|
||||
/obj/item/weapon/ore/copper,
|
||||
/obj/item/weapon/ore/copper
|
||||
),
|
||||
),*/
|
||||
prob(3);list(
|
||||
/obj/item/weapon/ore/diamond,
|
||||
/obj/item/weapon/ore/diamond,
|
||||
@@ -598,11 +598,11 @@
|
||||
prob(2);list(
|
||||
/obj/item/weapon/ore/verdantium,
|
||||
/obj/item/weapon/ore/verdantium
|
||||
),
|
||||
),/*
|
||||
prob(2);list(
|
||||
/obj/item/weapon/ore/void_opal,
|
||||
/obj/item/weapon/ore/void_opal
|
||||
),
|
||||
),*/
|
||||
)
|
||||
|
||||
/obj/random/multiple/corp_crate
|
||||
|
||||
96
code/game/objects/structures/alien/alien egg.dm
Normal file
96
code/game/objects/structures/alien/alien egg.dm
Normal file
@@ -0,0 +1,96 @@
|
||||
#define MAX_PROGRESS 100
|
||||
|
||||
/obj/structure/alien/egg //Gurg Addition, working alien egg structure.
|
||||
desc = "It looks like a weird egg."
|
||||
name = "egg"
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/progress = 0
|
||||
|
||||
/obj/structure/alien/egg/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/alien/egg/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/alien/egg/CanUseTopic(var/mob/user)
|
||||
return isobserver(user) ? STATUS_INTERACTIVE : STATUS_CLOSE
|
||||
|
||||
/obj/structure/alien/egg/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["spawn"])
|
||||
attack_ghost(usr)
|
||||
|
||||
/obj/structure/alien/egg/process()
|
||||
progress++
|
||||
if(progress >= MAX_PROGRESS)
|
||||
for(var/mob/observer/dead/O in observer_mob_list)
|
||||
if(O.client)
|
||||
to_chat(O, "<span class='notice'>An alien is ready to hatch at [get_area(src.loc)]! (<a href='byond://?src=\ref[src];spawn=1'>spawn</a>)</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/alien/egg/update_icon()
|
||||
if(progress == -1)
|
||||
icon_state = "egg_hatched"
|
||||
else if(progress < MAX_PROGRESS)
|
||||
icon_state = "egg_growing"
|
||||
else
|
||||
icon_state = "egg"
|
||||
|
||||
/obj/structure/alien/egg/attack_ghost(var/mob/observer/ghost/user)
|
||||
if(progress == -1) //Egg has been hatched.
|
||||
return
|
||||
|
||||
if(progress < MAX_PROGRESS)
|
||||
to_chat(user, "\The [src] has not yet matured.")
|
||||
return
|
||||
|
||||
if(!user.MayRespawn(1))
|
||||
return
|
||||
|
||||
// Check for bans properly.
|
||||
if(jobban_isbanned(user, "Xenomorph"))
|
||||
to_chat(user, "<span class='danger'>You are banned from playing a Xenomorph.</span>")
|
||||
return
|
||||
|
||||
var/confirm = alert(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", "No", "Yes")
|
||||
|
||||
if(!src || confirm != "Yes")
|
||||
return
|
||||
|
||||
if(!user || !user.ckey)
|
||||
return
|
||||
|
||||
if(progress == -1) //Egg has been hatched.
|
||||
to_chat(user, "Too slow...")
|
||||
return
|
||||
|
||||
flick("egg_opening",src)
|
||||
progress = -1 // No harvesting pls.
|
||||
sleep(5)
|
||||
|
||||
if(!src || !user)
|
||||
visible_message("<span class='alium'>\The [src] writhes with internal motion, but nothing comes out.</span>")
|
||||
progress = MAX_PROGRESS // Someone else can have a go.
|
||||
return // What a pain.
|
||||
|
||||
// Create the mob, transfer over key.
|
||||
var/mob/living/carbon/alien/larva/larva = new(get_turf(src))
|
||||
larva.ckey = user.ckey
|
||||
spawn(-1)
|
||||
if(user) qdel(user) // Remove the keyless ghost if it exists.
|
||||
|
||||
visible_message("<span class='alium'>\The [src] splits open with a wet slithering noise, and \the [larva] writhes free!</span>")
|
||||
|
||||
// Turn us into a hatched egg.
|
||||
name = "hatched alien egg"
|
||||
desc += " This one has hatched."
|
||||
update_icon()
|
||||
|
||||
#undef MAX_PROGRESS
|
||||
62
code/game/objects/structures/alien/alien.dm
Normal file
62
code/game/objects/structures/alien/alien.dm
Normal file
@@ -0,0 +1,62 @@
|
||||
/obj/structure/alien //Gurg Addition, framework for alien eggs.
|
||||
name = "alien thing"
|
||||
desc = "There's something alien about this."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
layer = ABOVE_JUNK_LAYER
|
||||
var/health = 50
|
||||
|
||||
/obj/structure/alien/proc/healthcheck()
|
||||
if(health <=0)
|
||||
set_density(0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/alien/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/alien/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
if(2.0)
|
||||
health-=50
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/alien/hitby(AM as mob|obj)
|
||||
..()
|
||||
visible_message("<span class='danger'>\The [src] was hit by \the [AM].</span>")
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/alien/attack_generic()
|
||||
attack_hand(usr)
|
||||
|
||||
/obj/structure/alien/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
health = max(0, health - W.force)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/alien/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
@@ -375,6 +375,12 @@
|
||||
persistence_id = "library_private"
|
||||
req_one_access = list(access_library)
|
||||
|
||||
/obj/structure/sign/painting/away_areas // for very hard-to-get-to areas
|
||||
name = "\improper Remote Painting Exhibit mounting"
|
||||
desc = "For art pieces made in the depths of space."
|
||||
desc_with_canvas = "A painting hung where only the determined can reach it."
|
||||
persistence_id = "away_area"
|
||||
|
||||
/obj/structure/sign/painting/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
if(persistence_id)
|
||||
|
||||
Reference in New Issue
Block a user