mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 01:51:46 +00:00
## About The Pull Request People can now pet held mothroaches and pugs if they want to, or use items on them, hopefully without causing many issues. After all, it only took about a couple dozen lines of code to make... ...Oh, did the 527 files changed or the 850~ lines added/removed perhaps catch your eye? Made you wonder if I accidentally pushed the wrong branch? or skewed something up big time? Well, nuh uh. I just happen to be fed up with the melee attack chain still using stringized params instead of an array/list. It was frankly revolting to see how I'd have had to otherwise call `list2params` for what I'm trying to accomplish here, and make this PR another tessera to the immense stupidity of our attack chain procs calling `params2list` over and over and over instead of just using that one call instance from `ClickOn` as an argument. It's 2025, honey, wake up! I also tried to replace some of those single letter vars/args but there are just way too many of them. ## Why It's Good For The Game Improving old code. And I want to be able to pet mobroaches while holding them too. ## Changelog 🆑 qol: You can now interact with held mobs in more ways beside wearing them. /🆑
163 lines
4.3 KiB
Plaintext
163 lines
4.3 KiB
Plaintext
|
|
/*Cabin areas*/
|
|
/area/awaymission/cabin
|
|
name = "Cabin"
|
|
icon_state = "away2"
|
|
requires_power = TRUE
|
|
static_lighting = TRUE
|
|
|
|
/area/awaymission/cabin/snowforest
|
|
name = "Snow Forest"
|
|
icon_state = "away"
|
|
|
|
/area/awaymission/cabin/snowforest/sovietsurface
|
|
name = "Snow Forest"
|
|
icon_state = "awaycontent29"
|
|
requires_power = FALSE
|
|
|
|
/area/awaymission/cabin/lumbermill
|
|
name = "Lumbermill"
|
|
icon_state = "away3"
|
|
requires_power = FALSE
|
|
|
|
/area/awaymission/cabin/caves/sovietcave
|
|
name = "Soviet Bunker"
|
|
icon_state = "awaycontent4"
|
|
|
|
/area/awaymission/cabin/caves
|
|
name = "North Snowdin Caves"
|
|
icon_state = "awaycontent15"
|
|
static_lighting = TRUE
|
|
|
|
/area/awaymission/cabin/caves/mountain
|
|
name = "North Snowdin Mountains"
|
|
icon_state = "awaycontent24"
|
|
|
|
/obj/structure/firepit
|
|
name = "firepit"
|
|
desc = "Warm and toasty."
|
|
icon = 'icons/obj/fluff/fireplace.dmi'
|
|
icon_state = "firepit-active"
|
|
density = FALSE
|
|
var/active = TRUE
|
|
|
|
/obj/structure/firepit/Initialize(mapload)
|
|
. = ..()
|
|
toggleFirepit()
|
|
|
|
/obj/structure/firepit/interact(mob/living/user)
|
|
if(active)
|
|
active = FALSE
|
|
toggleFirepit()
|
|
|
|
/obj/structure/firepit/attackby(obj/item/W,mob/living/user,list/modifiers)
|
|
if(!active)
|
|
var/msg = W.ignition_effect(src, user)
|
|
if(msg)
|
|
active = TRUE
|
|
visible_message(msg)
|
|
toggleFirepit()
|
|
else
|
|
return ..()
|
|
else
|
|
W.fire_act()
|
|
|
|
/obj/structure/firepit/proc/toggleFirepit()
|
|
active = !active
|
|
if(active)
|
|
set_light(8)
|
|
icon_state = "firepit-active"
|
|
else
|
|
set_light(0)
|
|
icon_state = "firepit"
|
|
|
|
/obj/structure/firepit/extinguish()
|
|
. = ..()
|
|
if(active)
|
|
active = FALSE
|
|
toggleFirepit()
|
|
|
|
/obj/structure/firepit/fire_act(exposed_temperature, exposed_volume)
|
|
if(!active)
|
|
active = TRUE
|
|
toggleFirepit()
|
|
|
|
|
|
|
|
//other Cabin Stuff//
|
|
|
|
/obj/machinery/recycler/lumbermill
|
|
name = "lumbermill saw"
|
|
desc = "Faster then the cartoons!"
|
|
obj_flags = CAN_BE_HIT | EMAGGED
|
|
item_recycle_sound = 'sound/items/weapons/chainsawhit.ogg'
|
|
|
|
/obj/machinery/recycler/lumbermill/recycle_item(obj/item/grown/log/L)
|
|
if(!istype(L))
|
|
return
|
|
else
|
|
var/potency = L.seed.potency
|
|
..()
|
|
new L.plank_type(src.loc, 1 + round(potency / 25))
|
|
|
|
/obj/structure/ladder/unbreakable/rune
|
|
name = "\improper Teleportation Rune"
|
|
desc = "Could lead anywhere."
|
|
icon = 'icons/obj/antags/cult/rune.dmi'
|
|
icon_state = "1"
|
|
color = rgb(0,0,255)
|
|
|
|
/obj/structure/ladder/unbreakable/rune/Initialize(mapload)
|
|
AddElement(/datum/element/update_icon_blocker)
|
|
return ..()
|
|
|
|
/obj/structure/ladder/unbreakable/rune/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
|
if(up)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Warp up"
|
|
if(down)
|
|
context[SCREENTIP_CONTEXT_RMB] = "Warp down"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
/obj/structure/ladder/unbreakable/rune/show_initial_fluff_message(mob/user, going_up)
|
|
user.balloon_alert_to_viewers("activating...")
|
|
|
|
/obj/structure/ladder/unbreakable/rune/show_final_fluff_message(mob/user, going_up)
|
|
visible_message(span_notice("[user] activates [src] and teleports away."))
|
|
user.balloon_alert_to_viewers("warped in")
|
|
|
|
/obj/structure/ladder/unbreakable/rune/use(mob/user, going_up = TRUE)
|
|
if(!IS_WIZARD(user))
|
|
..()
|
|
|
|
/*Cabin's forest. Removed in the new cabin map since it was buggy and I prefer manual placement.*/
|
|
/datum/map_generator/snowy
|
|
modules = list(/datum/map_generator_module/bottomlayer/snow, \
|
|
/datum/map_generator_module/snow/pine_trees, \
|
|
/datum/map_generator_module/snow/dead_trees, \
|
|
/datum/map_generator_module/snow/rand_bushes, \
|
|
/datum/map_generator_module/snow/rand_ice_rocks, \
|
|
/datum/map_generator_module/snow/bunnies)
|
|
|
|
/datum/map_generator_module/snow/checkPlaceAtom(turf/T)
|
|
if(istype(T, /turf/open/misc/asteroid/snow))
|
|
return ..()
|
|
return FALSE
|
|
|
|
/datum/map_generator_module/bottomlayer/snow
|
|
spawnableTurfs = list(/turf/open/misc/asteroid/snow/atmosphere = 100)
|
|
|
|
/datum/map_generator_module/snow/pine_trees
|
|
spawnableAtoms = list(/obj/structure/flora/tree/pine/style_random = 30)
|
|
|
|
/datum/map_generator_module/snow/dead_trees
|
|
spawnableAtoms = list(/obj/structure/flora/tree/dead/style_random = 10)
|
|
|
|
/datum/map_generator_module/snow/rand_bushes
|
|
spawnableAtoms = list(/obj/structure/flora/bush/snow/style_random = 1)
|
|
|
|
/datum/map_generator_module/snow/bunnies
|
|
spawnableAtoms = list(/mob/living/basic/rabbit = 0.5)
|
|
|
|
/datum/map_generator_module/snow/rand_ice_rocks
|
|
spawnableAtoms = list(/obj/structure/flora/rock/icy/style_random = 5, /obj/structure/flora/rock/pile/icy/style_random = 5)
|