mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 01:51:46 +00:00
* Refactors Rabbits to be a Basic Mob (#71205) ## About The Pull Request Back in #64175, I reworked rabbits such that their base behavior was just a cute fluffy snuggle monster, and not have the "easter" variant be the default. Now that we're transitioning everything from simple_animal to basic, I figured now was the time to shift that over too. Pretty much everything should be the same as it was before, I even took some time to add behavior to some elements to allow it to work (let me know if I should handle it a different way) but rabbits as a simple_animal and rabbits as a basic mob should now not be very distinguishable (beyond the fact that they only speak via subtrees). I also got rid of the single-letter icon_states in the DMI and accomodated the code to fix because I finally got irritated enough to do something about that. ## Why It's Good For The Game Although I didn't really have any pressing urge to add more complex AI behavior to rabbits than just pretty much re-implementing what they had as a simple_animal, this is an excellent first-step to allowing much more extensible behaviors to these fuzzy creatures. Also, it takes three more mobs off "the frozen list". Whoopie! ## Changelog 🆑 fix: Dead Black Space Rabbits should now properly have a sprite. /🆑 The UpdatePaths is useless for the maps we have on our repository (holodecks use a spawner code-side), but I'm going to be nice to downstreams who need it. * Refactors Rabbits to be a Basic Mob * Fixed the CI and the rabbit on VoidRaptor * Oops, forgot to remove it from here too Co-authored-by: san7890 <the@san7890.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
166 lines
4.4 KiB
Plaintext
166 lines
4.4 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"
|
|
static_lighting = FALSE
|
|
base_lighting_alpha = 255
|
|
|
|
/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
|
|
static_lighting = FALSE
|
|
base_lighting_alpha = 255
|
|
|
|
/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/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,params)
|
|
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/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/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)
|