mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 23:42:56 +00:00
Merge branch 'master' into upstream-merge-11213
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
var/spiders_min = 6
|
||||
var/spiders_max = 24
|
||||
var/spider_type = /obj/effect/spider/spiderling
|
||||
var/faction = "spiders"
|
||||
|
||||
/obj/effect/spider/eggcluster/Initialize()
|
||||
pixel_x = rand(3,-3)
|
||||
@@ -121,9 +122,10 @@
|
||||
O = loc
|
||||
|
||||
for(var/i=0, i<num, i++)
|
||||
var/spiderling = new spider_type(src.loc, src)
|
||||
var/obj/effect/spider/spiderling/spiderling = new spider_type(src.loc, src)
|
||||
if(O)
|
||||
O.implants += spiderling
|
||||
spiderling.faction = faction
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/eggcluster/small
|
||||
@@ -133,6 +135,11 @@
|
||||
/obj/effect/spider/eggcluster/small/frost
|
||||
spider_type = /obj/effect/spider/spiderling/frost
|
||||
|
||||
/obj/effect/spider/eggcluster/royal
|
||||
spiders_min = 2
|
||||
spiders_max = 5
|
||||
spider_type = /obj/effect/spider/spiderling/varied
|
||||
|
||||
/obj/effect/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
@@ -145,12 +152,20 @@
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/list/grow_as = list(/mob/living/simple_mob/animal/giant_spider, /mob/living/simple_mob/animal/giant_spider/nurse, /mob/living/simple_mob/animal/giant_spider/hunter)
|
||||
var/faction = "spiders"
|
||||
|
||||
var/stunted = FALSE
|
||||
|
||||
/obj/effect/spider/spiderling/frost
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/frost)
|
||||
|
||||
/obj/effect/spider/spiderling/varied
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider, /mob/living/simple_mob/animal/giant_spider/nurse, /mob/living/simple_mob/animal/giant_spider/hunter,
|
||||
/mob/living/simple_mob/animal/giant_spider/frost, /mob/living/simple_mob/animal/giant_spider/electric, /mob/living/simple_mob/animal/giant_spider/lurker,
|
||||
/mob/living/simple_mob/animal/giant_spider/pepper, /mob/living/simple_mob/animal/giant_spider/thermic, /mob/living/simple_mob/animal/giant_spider/tunneler,
|
||||
/mob/living/simple_mob/animal/giant_spider/webslinger, /mob/living/simple_mob/animal/giant_spider/phorogenic, /mob/living/simple_mob/animal/giant_spider/carrier,
|
||||
/mob/living/simple_mob/animal/giant_spider/ion)
|
||||
|
||||
/obj/effect/spider/spiderling/New(var/location, var/atom/parent)
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
@@ -260,6 +275,7 @@
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = pick(grow_as)
|
||||
var/mob/living/simple_mob/animal/giant_spider/GS = new spawn_type(src.loc, src)
|
||||
GS.faction = faction
|
||||
if(stunted)
|
||||
spawn(2)
|
||||
GS.make_spiderling()
|
||||
@@ -273,6 +289,15 @@
|
||||
/obj/effect/spider/spiderling/non_growing
|
||||
amount_grown = -1
|
||||
|
||||
/obj/effect/spider/spiderling/princess
|
||||
name = "royal spiderling"
|
||||
desc = "There's a special aura about this one."
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/nurse/queen)
|
||||
|
||||
/obj/effect/spider/spiderling/princess/New(var/location, var/atom/parent)
|
||||
..()
|
||||
amount_grown = 50
|
||||
|
||||
/obj/effect/decal/cleanable/spiderling_remains
|
||||
name = "spiderling remains"
|
||||
desc = "Green squishy mess."
|
||||
|
||||
@@ -949,4 +949,42 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
/// How are you described if at all when in pockets (or other 'usually not visible' places)
|
||||
/obj/item/proc/pocket_description(mob/haver, mob/examiner)
|
||||
return null // most things are hidden
|
||||
|
||||
|
||||
#define CELLS 8 //Amount of cells per row/column in grid
|
||||
#define CELLSIZE (world.icon_size/CELLS) //Size of a cell in pixels
|
||||
/*
|
||||
Automatic alignment of items to an invisible grid, defined by CELLS and CELLSIZE.
|
||||
Since the grid will be shifted to own a cell that is perfectly centered on the turf, we end up with two 'cell halves'
|
||||
on edges of each row/column.
|
||||
Each item defines a center_of_mass, which is the pixel of a sprite where its projected center of mass toward a turf
|
||||
surface can be assumed. For a piece of paper, this will be in its center. For a bottle, it will be (near) the bottom
|
||||
of the sprite.
|
||||
auto_align() will then place the sprite so the defined center_of_mass is at the bottom left corner of the grid cell
|
||||
closest to where the cursor has clicked on.
|
||||
Note: This proc can be overwritten to allow for different types of auto-alignment.
|
||||
*/
|
||||
|
||||
/obj/item/var/list/center_of_mass = list("x" = 16,"y" = 16)
|
||||
|
||||
/proc/auto_align(obj/item/W, click_parameters)
|
||||
if(!W.center_of_mass)
|
||||
W.randpixel_xy()
|
||||
return
|
||||
|
||||
if(!click_parameters)
|
||||
return
|
||||
|
||||
var/list/mouse_control = params2list(click_parameters)
|
||||
|
||||
var/mouse_x = text2num(mouse_control["icon-x"])
|
||||
var/mouse_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
if(isnum(mouse_x) && isnum(mouse_y))
|
||||
var/cell_x = max(0, min(CELLS-1, round(mouse_x/CELLSIZE)))
|
||||
var/cell_y = max(0, min(CELLS-1, round(mouse_y/CELLSIZE)))
|
||||
|
||||
W.pixel_x = (CELLSIZE * (0.5 + cell_x)) - W.center_of_mass["x"]
|
||||
W.pixel_y = (CELLSIZE * (0.5 + cell_y)) - W.center_of_mass["y"]
|
||||
|
||||
#undef CELLS
|
||||
#undef CELLSIZE
|
||||
@@ -15,6 +15,7 @@
|
||||
var/datum/material/reinf_material
|
||||
var/reinforcing = 0
|
||||
var/applies_material_colour = 1
|
||||
var/wall_type = /turf/simulated/wall
|
||||
|
||||
/obj/structure/girder/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
@@ -249,7 +250,7 @@
|
||||
wall_fake = 1
|
||||
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
Tsrc.ChangeTurf(wall_type)
|
||||
var/turf/simulated/wall/T = get_turf(src)
|
||||
T.set_material(M, reinf_material, girder_material)
|
||||
if(wall_fake)
|
||||
@@ -397,7 +398,7 @@
|
||||
if(RCD_FLOORWALL)
|
||||
to_chat(user, span("notice", "You finish a wall."))
|
||||
// This is mostly the same as using on a floor. The girder's material is preserved, however.
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
T.ChangeTurf(wall_type)
|
||||
var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built.
|
||||
// Apparently set_material(...) for walls requires refs to the material singletons and not strings.
|
||||
// This is different from how other material objects with their own set_material(...) do it, but whatever.
|
||||
@@ -412,3 +413,9 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/girder/bay
|
||||
wall_type = /turf/simulated/wall/bay
|
||||
|
||||
/obj/structure/girder/eris
|
||||
wall_type = /turf/simulated/wall/eris
|
||||
|
||||
@@ -620,4 +620,4 @@
|
||||
|
||||
/obj/effect/low_wall_spawner/eris/rphoron
|
||||
icon_state = "sp_rphoron"
|
||||
window_type = /obj/structure/window/eris/phoronreinforced
|
||||
window_type = /obj/structure/window/eris/phoronreinforced
|
||||
@@ -273,12 +273,14 @@
|
||||
to_chat(user, "<span class='notice'>You have [state == 1 ? "un" : ""]fastened the window [state ? "from" : "to"] the frame.</span>")
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
update_nearby_icons()
|
||||
update_verbs()
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You have [anchored ? "" : "un"]fastened the frame [anchored ? "to" : "from"] the floor.</span>")
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
update_nearby_icons()
|
||||
update_verbs()
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
|
||||
Reference in New Issue
Block a user