Merge branch 'master' into upstream-merge-32311
This commit is contained in:
@@ -10,65 +10,72 @@
|
||||
density = TRUE
|
||||
pixel_x = -16
|
||||
layer = FLY_LAYER
|
||||
var/cut = FALSE
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/W, mob/user, params)
|
||||
if(!cut && log_amount && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
if(log_amount && (!(flags_1 & NODECONSTRUCT_1)))
|
||||
if(W.sharpness && W.force > 0)
|
||||
if(W.hitsound)
|
||||
playsound(get_turf(src), W.hitsound, 100, 0, 0)
|
||||
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of sawing.")
|
||||
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
|
||||
if(cut)
|
||||
return
|
||||
if(do_after(user, 1000/W.force, target = src)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
|
||||
user.visible_message("<span class='notice'>[user] fells [src] with the [W].</span>","<span class='notice'>You fell [src] with the [W].</span>", "You hear the sound of a tree falling.")
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "tree_stump"
|
||||
density = FALSE
|
||||
pixel_x = -16
|
||||
name += " stump"
|
||||
cut = TRUE
|
||||
for(var/i=1 to log_amount)
|
||||
new /obj/item/grown/log/tree(get_turf(src))
|
||||
|
||||
var/obj/structure/flora/stump/S = new(loc)
|
||||
S.name = "[name] stump"
|
||||
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/stump
|
||||
name = "stump"
|
||||
desc = "This represents our promise to the crew, and the station itself, to cut down as many trees as possible." //running naked through the trees
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "tree_stump"
|
||||
density = FALSE
|
||||
pixel_x = -16
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
name = "pine tree"
|
||||
desc = "A coniferous pine tree."
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_1"
|
||||
var/list/icon_states = list("pine_1", "pine_2", "pine_3")
|
||||
|
||||
/obj/structure/flora/tree/pine/Initialize()
|
||||
icon_state = "pine_[rand(1, 3)]"
|
||||
. = ..()
|
||||
|
||||
if(islist(icon_states && icon_states.len))
|
||||
icon_state = pick(icon_states)
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas
|
||||
name = "xmas tree"
|
||||
desc = "A wondrous decorated Christmas tree."
|
||||
icon_state = "pine_c"
|
||||
var/gifts_under_tree = FALSE
|
||||
icon_states = null
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/presents
|
||||
icon_state = "pinepresents"
|
||||
desc = "A wondrous decorated Christmas tree. It has presents!"
|
||||
var/gift_type = /obj/item/a_gift/anything
|
||||
var/list/ckeys_that_took = list()
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/attack_hand(mob/living/user)
|
||||
if(!gifts_under_tree)
|
||||
return
|
||||
/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user)
|
||||
if(!user.ckey)
|
||||
return
|
||||
|
||||
if(ckeys_that_took[user.ckey])
|
||||
to_chat(user, "<span class='warning'>You already took your gift.</span>")
|
||||
to_chat(user, "<span class='warning'>There are no presents with your name on.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='warning'>After a bit of rummaging, you locate a gift with your name on it!</span>")
|
||||
ckeys_that_took[user.ckey] = TRUE
|
||||
var/obj/item/a_gift/anything/A = new
|
||||
user.put_in_hands(A)
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/Initialize()
|
||||
. = ..()
|
||||
icon_state = "pine_c"
|
||||
var/obj/item/G = new gift_type(src)
|
||||
user.put_in_hands(G)
|
||||
|
||||
/obj/structure/flora/tree/dead
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
L.buckled.unbuckle_mob(L,force=1)
|
||||
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to marble!</span>", "<span class='userdanger'>Your body freezes up! Can't... move... can't... think...</span>")
|
||||
L.forceMove(src)
|
||||
L.add_disability(MUTE, STATUE_MUTE)
|
||||
L.add_disability(DISABILITY_MUTE, STATUE_MUTE)
|
||||
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
|
||||
L.status_flags |= GODMODE
|
||||
obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
@@ -59,7 +59,7 @@
|
||||
if(petrified_mob)
|
||||
petrified_mob.status_flags &= ~GODMODE
|
||||
petrified_mob.forceMove(loc)
|
||||
petrified_mob.remove_disability(MUTE, STATUE_MUTE)
|
||||
petrified_mob.remove_disability(DISABILITY_MUTE, STATUE_MUTE)
|
||||
petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob
|
||||
petrified_mob.faction -= "mimic"
|
||||
petrified_mob = null
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
return FALSE
|
||||
P.setAngle(new_angle)
|
||||
P.Angle = new_angle
|
||||
return ..()
|
||||
|
||||
//DOUBLE
|
||||
@@ -229,7 +229,7 @@
|
||||
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
|
||||
if(ISINRANGE_EX(norm_inc, -90, 90))
|
||||
new_angle += 180
|
||||
P.setAngle(new_angle)
|
||||
P.Angle = new_angle
|
||||
return ..()
|
||||
|
||||
//BOX
|
||||
@@ -251,7 +251,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/box/auto_reflect(obj/item/projectile/P)
|
||||
P.setAngle(rotation_angle)
|
||||
P.Angle = rotation_angle
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/ex_act()
|
||||
|
||||
Reference in New Issue
Block a user