mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
enable greps properly (#10454)
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
GLOBAL_LIST_EMPTY(simple_portals)
|
||||
|
||||
/obj/effect/simple_portal
|
||||
name = "Portal"
|
||||
desc = "It looks like a portal that leads to somewhere, although you can't quite see through it."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "portal"
|
||||
density = 1
|
||||
unacidable = TRUE
|
||||
anchored = TRUE
|
||||
var/atom/destination
|
||||
var/teleport_sound = 'sound/effects/portal_effect.ogg'
|
||||
|
||||
/obj/effect/simple_portal/Initialize(mapload)
|
||||
..()
|
||||
GLOB.simple_portals += src
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/simple_portal/linked/LateInitialize()
|
||||
. = ..()
|
||||
if(portal_id)
|
||||
link_portal()
|
||||
|
||||
/obj/effect/simple_portal/Destroy()
|
||||
. = ..()
|
||||
GLOB.simple_portals -= src
|
||||
|
||||
/obj/effect/simple_portal/Bumped(atom/movable/AM)
|
||||
. = ..()
|
||||
handle_teleport(AM)
|
||||
|
||||
/obj/effect/simple_portal/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
handle_teleport(AM)
|
||||
|
||||
/obj/effect/simple_portal/proc/handle_teleport(atom/movable/AM)
|
||||
if(destination)
|
||||
AM.forceMove(destination)
|
||||
if(!AM.is_incorporeal() && !istype(AM,/mob/observer))
|
||||
playsound(get_turf(src),teleport_sound,60,1)
|
||||
playsound(get_turf(destination),teleport_sound,60,1)
|
||||
|
||||
/obj/effect/simple_portal/attack_ghost(var/mob/observer/dead/user)
|
||||
. = ..()
|
||||
handle_teleport(user)
|
||||
|
||||
/obj/effect/simple_portal/coords
|
||||
var/tele_x
|
||||
var/tele_y
|
||||
var/tele_z
|
||||
|
||||
/obj/effect/simple_portal/coords/handle_teleport(atom/movable/AM)
|
||||
destination = null
|
||||
if(!isnull(tele_x) && !isnull(tele_y) && !isnull(tele_z))
|
||||
destination = locate(tele_x,tele_y,tele_z)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/simple_portal/linked
|
||||
icon_state = "portal1"
|
||||
var/obj/effect/simple_portal/linked/linked_portal
|
||||
var/portal_id
|
||||
|
||||
/obj/effect/simple_portal/linked/handle_teleport(atom/movable/AM)
|
||||
destination = null
|
||||
update_icon()
|
||||
if(linked_portal && icon_state == "portal")
|
||||
var/rel_x = round(rand(-1,1))
|
||||
var/rel_y = round(rand(-1,1))
|
||||
var/movingdir = get_dir(AM,src)
|
||||
if(!isnull(movingdir))
|
||||
destination = get_step(get_turf(linked_portal),movingdir)
|
||||
else
|
||||
while(rel_x == 0 && rel_y == 0)
|
||||
rel_x = round(rand(-1,1))
|
||||
rel_y = round(rand(-1,1))
|
||||
destination = locate(linked_portal.loc.x + rel_x, linked_portal.loc.y + rel_y, linked_portal.loc.z)
|
||||
if(!valid_destination(destination))
|
||||
var/list/possible_x = shuffle(list(-1,0,1))
|
||||
var/list/possible_y = shuffle(list(-1,0,1))
|
||||
for(rel_x in possible_x)
|
||||
for(rel_y in possible_y)
|
||||
if(rel_x == 0 && rel_y == 0)
|
||||
continue
|
||||
destination = locate(linked_portal.loc.x + rel_x, linked_portal.loc.y + rel_y, linked_portal.loc.z)
|
||||
if(valid_destination(destination))
|
||||
break
|
||||
. = ..()
|
||||
|
||||
/obj/effect/simple_portal/linked/proc/valid_destination(var/turf/dest,var/atom/movable/AM)
|
||||
if(!dest)
|
||||
return FALSE
|
||||
if(dest.density)
|
||||
return FALSE
|
||||
if(dest == get_turf(linked_portal))
|
||||
return FALSE
|
||||
var/windows = 0
|
||||
for(var/obj/struct in dest)
|
||||
var/obj/structure/window/window = struct
|
||||
if(istype(window))
|
||||
windows++
|
||||
if(window.fulltile)
|
||||
return FALSE
|
||||
else
|
||||
if(!struct.density)
|
||||
continue
|
||||
if(struct.throwpass || struct.flags & ON_BORDER)
|
||||
continue
|
||||
else
|
||||
return FALSE
|
||||
if(windows>2)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/effect/simple_portal/linked/proc/link_portal()
|
||||
if(!portal_id)
|
||||
return "SET PORTAL ID FIRST"
|
||||
for(var/obj/effect/simple_portal/linked/candidate in GLOB.simple_portals)
|
||||
if(istype(candidate) && portal_id == candidate.portal_id && candidate != src)
|
||||
linked_portal = candidate
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/effect/simple_portal/linked/update_icon()
|
||||
if(linked_portal && !QDELETED(linked_portal))
|
||||
icon_state = "portal"
|
||||
else
|
||||
icon_state = "portal1"
|
||||
@@ -0,0 +1,14 @@
|
||||
GLOBAL_LIST_EMPTY(button_mob_spawner_landmark)
|
||||
|
||||
/obj/effect/landmark/button_mob_spawner_landmark
|
||||
name = "Mob Spawner"
|
||||
icon = 'modular_chomp/icons/obj/storage.dmi'
|
||||
icon_state = "expirmentalaid"
|
||||
var/link = "MOBSPAWN"
|
||||
|
||||
/obj/effect/landmark/button_mob_spawner_landmark/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.button_mob_spawner_landmark[link] = src
|
||||
|
||||
/obj/effect/landmark/button_mob_spawner_landmark/second
|
||||
link = "MOBSPAWNSECOND"
|
||||
@@ -0,0 +1,36 @@
|
||||
//Eggs
|
||||
/obj/effect/spider/eggcluster/broodling
|
||||
spider_type = /obj/effect/spider/spiderling/broodling
|
||||
|
||||
/obj/effect/spider/eggcluster/royal/broodling
|
||||
spider_type = /obj/effect/spider/spiderling/varied/broodling
|
||||
|
||||
|
||||
|
||||
//Spiderling types
|
||||
/obj/effect/spider/spiderling/broodling
|
||||
name = "brood spiderling"
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/broodling, /mob/living/simple_mob/animal/giant_spider/nurse/broodling, /mob/living/simple_mob/animal/giant_spider/hunter/broodling)
|
||||
|
||||
/obj/effect/spider/spiderling/varied/broodling
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/broodling, /mob/living/simple_mob/animal/giant_spider/nurse/broodling, /mob/living/simple_mob/animal/giant_spider/hunter/broodling,
|
||||
/mob/living/simple_mob/animal/giant_spider/frost/broodling, /mob/living/simple_mob/animal/giant_spider/electric/broodling, /mob/living/simple_mob/animal/giant_spider/lurker/broodling,
|
||||
/mob/living/simple_mob/animal/giant_spider/pepper/broodling, /mob/living/simple_mob/animal/giant_spider/thermic/broodling, /mob/living/simple_mob/animal/giant_spider/tunneler/broodling,
|
||||
/mob/living/simple_mob/animal/giant_spider/webslinger/broodling)
|
||||
|
||||
//Space Spiderling
|
||||
/obj/effect/spider/eggcluster/space
|
||||
spider_type = /obj/effect/spider/spiderling/space
|
||||
|
||||
/obj/effect/spider/eggcluster/royal/space
|
||||
spider_type = /obj/effect/spider/spiderling/varied/space
|
||||
|
||||
/obj/effect/spider/spiderling/space
|
||||
name = "brood spiderling"
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/space, /mob/living/simple_mob/animal/giant_spider/nurse/space, /mob/living/simple_mob/animal/giant_spider/hunter/space)
|
||||
|
||||
/obj/effect/spider/spiderling/varied/space
|
||||
grow_as = list(/mob/living/simple_mob/animal/giant_spider/space, /mob/living/simple_mob/animal/giant_spider/nurse/space, /mob/living/simple_mob/animal/giant_spider/hunter/space,
|
||||
/mob/living/simple_mob/animal/giant_spider/frost/space, /mob/living/simple_mob/animal/giant_spider/electric/space, /mob/living/simple_mob/animal/giant_spider/lurker/space,
|
||||
/mob/living/simple_mob/animal/giant_spider/pepper/space, /mob/living/simple_mob/animal/giant_spider/thermic/space, /mob/living/simple_mob/animal/giant_spider/tunneler/space,
|
||||
/mob/living/simple_mob/animal/giant_spider/webslinger/space)
|
||||
@@ -0,0 +1,38 @@
|
||||
/obj/effect/step_trigger/teleporter/deathfall/Initialize(mapload)
|
||||
. = ..()
|
||||
teleport_z = src.z //This is for use in gateways, so mappers can hard map the X and Y without worrying about going to brazil
|
||||
|
||||
/obj/effect/step_trigger/teleporter/deathfall/Trigger(var/atom/movable/A)
|
||||
var/turf/simulated/T = locate(teleport_x, teleport_y, teleport_z)
|
||||
if(!istype(T))
|
||||
log_debug("[src] failed to find destination turf.")
|
||||
return
|
||||
if(A.hovering)//Flying people dont fall
|
||||
return
|
||||
if(isobserver(A))
|
||||
A.forceMove(T) // Harmlessly move ghosts.
|
||||
return
|
||||
if(A.throwing) //jumpboots
|
||||
return
|
||||
if(!(A.can_fall())) //test
|
||||
return // Phased shifted kin should not fall
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(A))
|
||||
L = A
|
||||
if(L.is_floating)
|
||||
return //Flyers/nograv can ignore it
|
||||
|
||||
A.forceMove(T)
|
||||
// Living things should probably be logged when they fall...
|
||||
if(isliving(A))
|
||||
message_admins("\The [A] fell out of the sky.")
|
||||
// ... because they're probably going to die from it.
|
||||
A.fall_impact(T, 42, 90, FALSE, TRUE) //Medical gameplay generator
|
||||
else
|
||||
message_admins("ERROR: planetary_fall step trigger lacks a planet to fall onto.")
|
||||
return
|
||||
|
||||
/obj/effect/step_trigger/teleporter/poi/Initialize(mapload) //This is for placing teleporters in gateways/POIS, where Z levels can be different and I cant be assed to make fake teleporter stairs
|
||||
. = ..()
|
||||
teleport_z = src.z
|
||||
@@ -14,4 +14,3 @@
|
||||
attack_verb = list("stabbed", "poked", "slashed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
name = "Taur Duty Vest (Heavy)"
|
||||
desc = "An armored vest with the armor modules replaced with various handy compartments with decent storage capacity. Useless for protection though. Holds more than its lighter cousin.."
|
||||
max_storage_space = INVENTORY_DUFFLEBAG_SPACE
|
||||
slowdown = 0.5
|
||||
slowdown = 0.5
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
max_health = 250
|
||||
pixel_x = -48
|
||||
pixel_y = -12
|
||||
shake_animation_degrees = 2
|
||||
shake_animation_degrees = 2
|
||||
|
||||
@@ -299,4 +299,4 @@
|
||||
prob(1);/obj/structure/outcrop/platinum/tyr,
|
||||
prob(5);/obj/structure/outcrop/weathered_gate,
|
||||
prob(3);/obj/structure/outcrop/hydrogen,
|
||||
prob(1);/obj/structure/outcrop/lead/tyr)
|
||||
prob(1);/obj/structure/outcrop/lead/tyr)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/obj/item/starcaster_news/after_trash_eaten(var/mob/living/user)
|
||||
to_chat(user, span_notice("You can taste the dry flavor of digital garbage, oh wait its just the news."))
|
||||
|
||||
/obj/item/newspaper/after_trash_eaten(var/mob/living/user)
|
||||
to_chat(user, span_notice("You can taste the dry flavor of garbage, oh wait its just the news."))
|
||||
|
||||
/obj/item/cell/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] sates their electric appetite with a [src]!"))
|
||||
to_chat(user, span_notice("You can taste the spicy flavor of electrolytes, yum."))
|
||||
|
||||
/obj/item/walkpod/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] sates their musical appetite with a [src]!"))
|
||||
to_chat(user, span_notice("You can taste the jazzy flavor of music."))
|
||||
|
||||
/obj/item/mail/junkmail/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] devours the [src]!"))
|
||||
to_chat(user, span_notice("You can taste the flavor of the galactic postal service."))
|
||||
|
||||
/obj/item/gun/energy/sizegun/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] devours the [src]!"))
|
||||
to_chat(user, span_notice("You didn't read the warning label, did you?"))
|
||||
|
||||
/obj/item/slow_sizegun/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] devours the [src]!"))
|
||||
to_chat(user, span_notice("You taste the flavor of sunday driver bluespace."))
|
||||
|
||||
/obj/item/laser_pointer/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] devours the [src]!"))
|
||||
to_chat(user, span_notice("You taste the flavor of a laser."))
|
||||
|
||||
/obj/item/canvas/after_trash_eaten(var/mob/living/user)
|
||||
visible_message(span_warning("[user] devours the [src]!"))
|
||||
to_chat(user, span_notice("You taste the flavor of priceless artwork."))
|
||||
Reference in New Issue
Block a user