mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Final merge
Merge branch 'development-2' into development # Conflicts: # baystation12.dme # code/_helpers/icons.dm # code/controllers/master_controller.dm # code/game/machinery/Sleeper.dm # code/game/machinery/computer3/laptop.dm # code/game/machinery/doors/door.dm # code/game/machinery/floorlayer.dm # code/game/machinery/vending.dm # code/game/mecha/mech_fabricator.dm # code/game/objects/effects/decals/contraband.dm # code/game/objects/explosion.dm # code/game/objects/items/robot/robot_upgrades.dm # code/game/objects/items/weapons/melee/misc.dm # code/game/objects/items/weapons/storage/boxes.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/window.dm # code/modules/clothing/spacesuits/rig/rig.dm # code/modules/clothing/suits/jobs.dm # code/modules/mob/freelook/update_triggers.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/human_movement.dm # code/modules/mob/living/carbon/human/life.dm # code/modules/mob/living/carbon/human/species/species.dm # code/modules/mob/living/carbon/human/species/station/station.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob_helpers.dm # code/modules/mob/mob_movement.dm # code/modules/projectiles/ammunition/boxes.dm # nano/templates/sleeper.tmpl
This commit is contained in:
@@ -55,7 +55,12 @@
|
||||
else
|
||||
user << "It is full."
|
||||
|
||||
|
||||
/obj/structure/closet/proc/stored_weight()
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
return content_size
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -249,20 +249,22 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/under/det/grey(src)
|
||||
new /obj/item/clothing/under/det/black(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench/grey(src)
|
||||
new /obj/item/clothing/under/det/slob(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/technicolor(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/det(src)
|
||||
new /obj/item/clothing/head/det/grey(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/head/det_hat/technicolor(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/suit/storage/vest/detective(src)
|
||||
|
||||
@@ -36,11 +36,20 @@
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.forceMove(get_turf(src))
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
for (var/mob/M in src)
|
||||
M.forceMove(get_turf(src))
|
||||
if (M.stat == CONSCIOUS)
|
||||
M.visible_message(span("danger","\The [M.name] bursts out of the [src]!"), span("danger","You burst out of the [src]!"))
|
||||
else
|
||||
M.visible_message(span("danger","\The [M.name] tumbles out of the [src]!"))
|
||||
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/close()
|
||||
@@ -67,6 +76,14 @@
|
||||
src.opened = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile) && prob(50))
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
return ..()
|
||||
@@ -496,3 +513,60 @@
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
|
||||
|
||||
//A crate that populates itself with randomly selected loot from randomstock.dm
|
||||
//Can be passed in a rarity value, which is used as a multiplier on the rare/uncommon chance
|
||||
//Quantity of spawns is number of discrete selections from the loot lists, default 10
|
||||
|
||||
/obj/structure/closet/crate/loot
|
||||
name = "unusual container"
|
||||
desc = "A mysterious container of unknown origins. What mysteries lie within?"
|
||||
var/rarity = 1
|
||||
var/quantity = 10
|
||||
var/list/spawntypes
|
||||
|
||||
//The crate chooses its icon randomly from a number of noticeable options.
|
||||
//None of these are the standard grey crate sprite, and a few are currently unused ingame
|
||||
//This ensures that people stumbling across a lootbox will notice it's different and investigate
|
||||
var/list/iconchoices = list(
|
||||
"radiation" = "radiationopen",
|
||||
"o2crate" = "o2crateopen",
|
||||
"freezer" = "freezeropen",
|
||||
"weaponcrate" = "weaponcrateopen",
|
||||
"largebins" = "largebinsopen",
|
||||
"phoroncrate" = "phoroncrateopen",
|
||||
"trashcart" = "trashcartopen",
|
||||
"critter" = "critteropen",
|
||||
"largemetal" = "largemetalopen",
|
||||
"medicalcrate" = "medicalcrateopen")
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
|
||||
|
||||
rarity = _rarity
|
||||
quantity = _quantity
|
||||
..(location)
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/initialize()
|
||||
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
|
||||
|
||||
icon_closed = pick(iconchoices)
|
||||
icon_opened = iconchoices[icon_closed]
|
||||
update_icon()
|
||||
while (quantity > 0)
|
||||
quantity --
|
||||
var/newtype = get_spawntype()
|
||||
spawn_stock(newtype,src)
|
||||
|
||||
/obj/structure/closet/crate/loot/proc/get_spawntype()
|
||||
var/stocktype = pickweight(spawntypes)
|
||||
switch (stocktype)
|
||||
if ("1")
|
||||
return pickweight(random_stock_rare)
|
||||
if ("2")
|
||||
return pickweight(random_stock_uncommon)
|
||||
if ("3")
|
||||
return pickweight(random_stock_common)
|
||||
@@ -78,6 +78,15 @@
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
|
||||
//Added random icon selection for potted plants.
|
||||
//It was silly they always used the same sprite when we have 26 sprites of them in the icon file
|
||||
/obj/structure/flora/pottedplant/random/New()
|
||||
..()
|
||||
var/number = rand(1,26)
|
||||
if (number < 10)
|
||||
number = "0[number]"
|
||||
icon_state = "plant-[number]"
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
|
||||
@@ -23,21 +23,24 @@
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
unfasten()
|
||||
else ..()
|
||||
|
||||
/obj/structure/sign/proc/unfasten()
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = 3 //big
|
||||
w_class = 5 //big
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user as mob)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 60, 1)
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
@@ -186,13 +186,13 @@
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 90, 1)
|
||||
user.do_attack_animation(src)
|
||||
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
|
||||
"<span class='danger'>You bang against \the [src]!</span>",
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 60, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
||||
"You knock on the [src.name].",
|
||||
"You hear a knocking sound.")
|
||||
@@ -207,6 +207,7 @@
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 7, 1, -1)
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user