mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
More interactions for small mobs (#6764)
Small mobs such as rats can now bite cables. Small mobs that can ventcrawl now interact with atmospheric machines that contain pumps Small mobs can no longer block airlocks by standing in them.
This commit is contained in:
@@ -1149,7 +1149,7 @@ About the new airlock wires panel:
|
||||
return 0
|
||||
|
||||
/mob/living/blocks_airlock()
|
||||
return 1
|
||||
return mob_size > MOB_SMALL
|
||||
|
||||
/atom/movable/proc/airlock_crush(var/crush_damage)
|
||||
return 0
|
||||
|
||||
@@ -274,6 +274,11 @@
|
||||
/mob/living/simple_animal/rat/dust()
|
||||
..(anim = "dust_[body_color]", remains = /obj/effect/decal/remains/rat, iconfile = 'icons/mob/npc/rat.dmi')
|
||||
|
||||
/mob/living/simple_animal/rat/airlock_crush(var/crush_damage)
|
||||
. = ..()
|
||||
if(crush_damage > health)
|
||||
splat()
|
||||
|
||||
/*
|
||||
* Mouse types
|
||||
*/
|
||||
|
||||
@@ -202,6 +202,15 @@ var/list/possible_cable_coil_colours = list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/cable/attack_generic(var/mob/user)
|
||||
//Let those rats (and other small things) nibble the cables
|
||||
if (issmall(user) && !isDrone(user))
|
||||
to_chat(user, span("danger","You bite into \the [src]."))
|
||||
if(powernet && powernet.avail > 100) //100W should be sufficient to grill a rat
|
||||
spark(src)
|
||||
user.dust()
|
||||
..()
|
||||
|
||||
/obj/structure/cable/shuttle_move(turf/loc)
|
||||
..()
|
||||
SSmachinery.powernet_update_queued = TRUE
|
||||
|
||||
@@ -23,6 +23,78 @@
|
||||
L.ventcrawl_layer = layer
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
Blend(AM, network2)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
Blend(AM, null)
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
Blend(AM, null)
|
||||
|
||||
//Blends a mob AM and outputs the contents via vents in pipe_network N
|
||||
// If the network is not set, creates a local cloud
|
||||
/obj/machinery/atmospherics/proc/Blend(atom/movable/AM, var/datum/pipe_network/N)
|
||||
//If its not small or the device isnt enabled, it wont blend
|
||||
if(!issmall(AM) || !use_power)
|
||||
return FALSE
|
||||
|
||||
//Get the things we need to create the "output"
|
||||
var/mob/living/L = AM
|
||||
|
||||
var/blood_color = "#A10808"
|
||||
if(L.blood_color)
|
||||
blood_color = L.blood_color
|
||||
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/C = AM
|
||||
blood_color = C.species.blood_color
|
||||
|
||||
var/reagent_amount = L.mob_size * 2
|
||||
|
||||
//Blend the Mob
|
||||
to_chat(AM, span("danger","\The [src] blends you to a fine dust."))
|
||||
L.death()
|
||||
qdel(L)
|
||||
|
||||
//Output what´s left through the connected vents
|
||||
if(N)
|
||||
var/count = 0
|
||||
for(var/V in N.normal_members)
|
||||
CHECK_TICK
|
||||
if(count > reagent_amount)
|
||||
return TRUE
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent = V
|
||||
if(istype(V, /obj/machinery/atmospherics/unary/vent_pump) && vent.loc && !vent.is_welded())
|
||||
var/datum/reagents/R = new/datum/reagents(reagent_amount)
|
||||
R.my_atom = vent
|
||||
R.add_reagent("blood", reagent_amount, list("blood_colour" = blood_color))
|
||||
|
||||
var/datum/effect/effect/system/smoke_spread/chem/smoke = new
|
||||
smoke.show_log = 0 // This displays a log on creation
|
||||
smoke.show_touch_log = 1 // This displays a log when a player is chemically affected
|
||||
smoke.set_up(R, 3, 0, vent, 20)
|
||||
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.start()
|
||||
qdel(R)
|
||||
count++
|
||||
else
|
||||
var/datum/reagents/R = new/datum/reagents(reagent_amount)
|
||||
R.my_atom = src
|
||||
R.add_reagent("blood", reagent_amount, list("blood_colour" = blood_color))
|
||||
|
||||
var/datum/effect/effect/system/smoke_spread/chem/smoke = new
|
||||
smoke.show_log = 0 // This displays a log on creation
|
||||
smoke.show_touch_log = 1 // This displays a log when a player is chemically affected
|
||||
smoke.set_up(R, 3, 0, src, 20)
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.start()
|
||||
qdel(R)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
|
||||
if(user.loc != src || !(direction & initialize_directions)) //can't go in a way we aren't connecting to
|
||||
return
|
||||
@@ -44,6 +116,8 @@
|
||||
user.remove_ventcrawl()
|
||||
user.add_ventcrawl(target_move)
|
||||
user.forceMove(target_move)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
user.client.eye = target_move //if we don't do this, Byond only updates the eye every tick - required for smooth movement
|
||||
if(world.time > user.next_play_vent)
|
||||
user.next_play_vent = world.time+30
|
||||
@@ -115,4 +189,4 @@ obj/machinery/atmospherics/trinary/isConnectable(var/obj/machinery/atmospherics/
|
||||
if(!do_after(L, 100, needhand = 0, act_target = get_turf(src)) || !can_z_crawl(L, direction))
|
||||
to_chat(L, span("danger", "You gave up on climbing [travel_direction_name] the pipe."))
|
||||
return FALSE
|
||||
return ventcrawl_to(L, node2, null)
|
||||
return ventcrawl_to(L, node2, null)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Small mobs can now bite into powerwires."
|
||||
- tweak: "Pumps and other atmos machines that contain pumps now interact with small mobs."
|
||||
- tweak: "Airlocks now close on small mobs."
|
||||
Reference in New Issue
Block a user