mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Makes speed setting affect disposals outlet range and alters emag behaviour (#75562)
## About The Pull Request Adds range per setting on disposals outlets, meaning packages (or weapons) can be launched further and, at it's highest settings, embed/hurt or break bones. Also, makes the emag effect automatically switch to the highest speed/range and doesn't allow it to go below it. ## Why It's Good For The Game Cargo techs have very few antaggy things under their jurisdiction and leaves few options. With disposals becoming more commonly used as a fantastic option for delivery, adding more meaningful ways to sabotage it would offer more options. Also, this opens up lots of opportunities for traps. ## Changelog 🆑 add: Made disposals outlets launch with more range depending on the setting used add: Made disposals outlets emag effect irreversible without reconstruction /🆑 --------- Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
co-authored by
ShizCalev
parent
c6450a055f
commit
ecc6c3b9f6
@@ -1,12 +1,16 @@
|
||||
//how fast disposal machinery is ejecting things (does not effect range)
|
||||
//how fast disposal machinery is ejecting things and how far it goes
|
||||
/// The slowest setting for disposal eject speed
|
||||
#define EJECT_SPEED_SLOW 1
|
||||
#define EJECT_RANGE_SLOW 2
|
||||
/// The default setting for disposal eject speed
|
||||
#define EJECT_SPEED_MED 2
|
||||
#define EJECT_RANGE_MED 4
|
||||
/// The fast setting for disposal eject speed
|
||||
#define EJECT_SPEED_FAST 4
|
||||
/// The fastest setting for disposal eject speed
|
||||
#define EJECT_RANGE_FAST 6
|
||||
/// The fastest, emag exclusive setting for disposal eject speed
|
||||
#define EJECT_SPEED_YEET 6
|
||||
#define EJECT_RANGE_YEET 10
|
||||
|
||||
// the disposal outlet machine
|
||||
/obj/structure/disposaloutlet
|
||||
@@ -21,9 +25,9 @@
|
||||
var/obj/structure/disposalpipe/trunk/trunk // the attached pipe trunk
|
||||
var/obj/structure/disposalconstruct/stored
|
||||
var/start_eject = 0
|
||||
var/eject_range = 2
|
||||
var/eject_range = EJECT_RANGE_SLOW
|
||||
/// how fast we're spitting fir- atoms
|
||||
var/eject_speed = EJECT_SPEED_MED
|
||||
var/eject_speed = EJECT_SPEED_SLOW
|
||||
|
||||
/obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from)
|
||||
. = ..()
|
||||
@@ -101,19 +105,21 @@
|
||||
|
||||
/obj/structure/disposaloutlet/multitool_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
to_chat(user, span_notice("You adjust the ejection force on \the [src]."))
|
||||
switch(eject_speed)
|
||||
if(EJECT_SPEED_SLOW)
|
||||
eject_speed = EJECT_SPEED_MED
|
||||
if(EJECT_SPEED_MED)
|
||||
eject_speed = EJECT_SPEED_FAST
|
||||
if(EJECT_SPEED_FAST)
|
||||
if(obj_flags & EMAGGED)
|
||||
eject_speed = EJECT_SPEED_YEET
|
||||
//if emagged it cant change the speed setting off max
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, span_notice("The LED display flashes an error!"))
|
||||
else
|
||||
to_chat(user, span_notice("You adjust the ejection force on \the [src]."))
|
||||
switch(eject_speed)
|
||||
if(EJECT_SPEED_SLOW)
|
||||
eject_speed = EJECT_SPEED_MED
|
||||
eject_range = EJECT_RANGE_MED
|
||||
if(EJECT_SPEED_MED)
|
||||
eject_speed = EJECT_SPEED_FAST
|
||||
eject_range = EJECT_RANGE_FAST
|
||||
else
|
||||
eject_speed = EJECT_SPEED_SLOW
|
||||
if(EJECT_SPEED_YEET)
|
||||
eject_speed = EJECT_SPEED_SLOW
|
||||
eject_range = EJECT_RANGE_SLOW
|
||||
return TRUE
|
||||
|
||||
/obj/structure/disposaloutlet/emag_act(mob/user, obj/item/card/emag/E)
|
||||
@@ -122,8 +128,14 @@
|
||||
return
|
||||
to_chat(user, span_notice("You silently disable the sanity checking on \the [src]'s ejection force."))
|
||||
obj_flags |= EMAGGED
|
||||
eject_speed = EJECT_SPEED_YEET
|
||||
eject_range = EJECT_RANGE_YEET
|
||||
|
||||
#undef EJECT_SPEED_SLOW
|
||||
#undef EJECT_SPEED_MED
|
||||
#undef EJECT_SPEED_FAST
|
||||
#undef EJECT_SPEED_YEET
|
||||
#undef EJECT_RANGE_SLOW
|
||||
#undef EJECT_RANGE_MED
|
||||
#undef EJECT_RANGE_FAST
|
||||
#undef EJECT_RANGE_YEET
|
||||
|
||||
Reference in New Issue
Block a user