mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Ports the weather system from Nebula. (#18706)
* part 1 * compiles? * IT WORKS * vis contents * fixes * umbrelloid * umbrella 2 * dsasdd * stuff * lmao --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -1227,3 +1227,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/proc/is_shovel()
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/gives_weather_protection()
|
||||
return FALSE
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
to_chat(user, SPAN_NOTICE("You attach \the [src] to \the [A]."))
|
||||
user.drop_from_inventory(src, A)
|
||||
attached = WEAKREF(A)
|
||||
A.vis_contents += src
|
||||
A.add_vis_contents(src)
|
||||
|
||||
/obj/item/sticker/proc/remove_sticker(var/mob/user)
|
||||
user.put_in_hands(src)
|
||||
var/atom/movable/attached_atom = attached.resolve()
|
||||
if(attached_atom)
|
||||
to_chat(user, SPAN_NOTICE("You remove \the [src] from \the [attached_atom]."))
|
||||
attached_atom.vis_contents -= src
|
||||
attached_atom.remove_vis_contents(src)
|
||||
attached = null
|
||||
|
||||
/obj/item/sticker/googly_eye
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/obj/item/umbrella
|
||||
name = "umbrella"
|
||||
desc = "A perfect tool to protect you from the elements."
|
||||
icon = 'icons/obj/item/umbrellas.dmi'
|
||||
icon_state = "umbrella_yellow_closed"
|
||||
contained_sprite = TRUE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
matter = list(MATERIAL_PLASTIC = 1000)
|
||||
force = 5
|
||||
sharp = TRUE
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("pokes", "stabs")
|
||||
/// If the umbrella is open or not.
|
||||
var/is_open = FALSE
|
||||
/// Colour of the umbrella. Must be one present in the dmi.
|
||||
var/umbrella_color
|
||||
|
||||
/obj/item/umbrella/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
if(!umbrella_color)
|
||||
umbrella_color = pick("black", "red", "yellow", "green")
|
||||
icon_state = "umbrella_[umbrella_color]"
|
||||
item_state = icon_state + "_closed"
|
||||
update_icon()
|
||||
|
||||
/obj/item/umbrella/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(!user.incapacitated())
|
||||
if(!is_open)
|
||||
to_chat(user, SPAN_NOTICE("You unfurl \the [src]."))
|
||||
item_state = "umbrella_[umbrella_color]_open"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
is_open = TRUE
|
||||
force = 1
|
||||
sharp = FALSE
|
||||
attack_verb = list("taps")
|
||||
hitsound = /singleton/sound_category/punchmiss_sound
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You close up \the [src]."))
|
||||
item_state = "umbrella_[umbrella_color]_closed"
|
||||
w_class = initial(w_class)
|
||||
is_open = FALSE
|
||||
force = initial(force)
|
||||
sharp = initial(sharp)
|
||||
attack_verb = initial(attack_verb)
|
||||
hitsound = initial(hitsound)
|
||||
|
||||
/obj/item/umbrella/gives_weather_protection()
|
||||
return is_open ? TRUE : FALSE
|
||||
|
||||
/obj/item/umbrella/red
|
||||
umbrella_color = "red"
|
||||
icon_state = "umbrella_red_closed"
|
||||
|
||||
/obj/item/umbrella/black
|
||||
umbrella_color = "black"
|
||||
icon_state = "umbrella_black_closed"
|
||||
|
||||
/obj/item/umbrella/yellow
|
||||
umbrella_color = "yellow"
|
||||
icon_state = "umbrella_yellow_closed"
|
||||
|
||||
/obj/item/umbrella/green
|
||||
umbrella_color = "green"
|
||||
icon_state = "umbrella_green_closed"
|
||||
@@ -432,7 +432,7 @@
|
||||
stored_end.transform = M_end
|
||||
|
||||
storage_screens += list(stored_start, stored_continue, stored_end)
|
||||
storage_start.vis_contents += list(stored_start, stored_continue, stored_end)
|
||||
storage_start.add_vis_contents(list(stored_start, stored_continue, stored_end))
|
||||
|
||||
O.screen_loc = "4:[round((startpoint+endpoint)/2)+2],2:16"
|
||||
O.maptext = ""
|
||||
|
||||
@@ -608,7 +608,7 @@
|
||||
|
||||
/obj/structure/closet/proc/end_door_animation()
|
||||
is_animating_door = FALSE // comment this out and the line below to manually tweak the animation end state by fiddling with the door_anim vars to match the open door icon
|
||||
vis_contents -= door_obj
|
||||
remove_vis_contents(door_obj)
|
||||
update_icon()
|
||||
compile_overlays(src)
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
|
||||
/obj/structure/closet/proc/end_door_animation_alt()
|
||||
is_animating_door = FALSE // comment this out and the line below to manually tweak the animation end state by fiddling with the door_anim vars to match the open door icon
|
||||
vis_contents -= door_obj_alt
|
||||
remove_vis_contents(door_obj_alt)
|
||||
update_icon()
|
||||
compile_overlays(src)
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
for(var/mob/living/carbon/human/H in loc)
|
||||
check_vampire_enter(H.loc, H)
|
||||
|
||||
vis_contents += get_turf(mirror)
|
||||
add_vis_contents(get_turf(mirror))
|
||||
|
||||
/obj/effect/reflection/proc/check_vampire_enter(var/turf/T, var/mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
add_overlay(light)
|
||||
if(vitals)
|
||||
vitals.update_monitor()
|
||||
vis_contents += vitals
|
||||
add_vis_contents(vitals)
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/attacking_item, mob/user)
|
||||
if(iswrench(attacking_item) || istype(attacking_item, /obj/item/stack) || iswirecutter(attacking_item))
|
||||
|
||||
Reference in New Issue
Block a user