This commit is contained in:
izac112
2020-09-29 05:56:00 +02:00
953 changed files with 116651 additions and 44088 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ LINEN BINS
throw_speed = 1
throw_range = 2
w_class = ITEMSIZE_SMALL
drop_sound = 'sound/items/drop/cloth.ogg'
pickup_sound = 'sound/items/pickup/cloth.ogg'
drop_sound = 'sound/items/drop/clothing.ogg'
pickup_sound = 'sound/items/pickup/clothing.ogg'
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
+1 -1
View File
@@ -9,7 +9,7 @@
var/burning = FALSE
var/next_fuel_consumption = 0 // world.time of when next item in fuel list gets eatten to sustain the fire.
var/grill = FALSE
var/material/material
var/datum/material/material
var/set_temperature = T0C + 30 //K
var/heating_power = 80000
@@ -66,7 +66,7 @@
/obj/structure/closet/secure_closet/hos
name = "head of security's locker"
req_access = list(access_hos)
storage_capacity = 2.5 * MOB_MEDIUM
storage_capacity = 2.6 * MOB_MEDIUM
closet_appearance = /decl/closet_appearance/secure_closet/security/hos
starts_with = list(
@@ -102,7 +102,8 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/security,
/obj/item/clothing/shoes/boots/winter/security,
/obj/item/device/flashlight/maglight,
/obj/item/clothing/mask/gas/half)
/obj/item/clothing/mask/gas/half,
/obj/item/clothing/mask/gas/sechailer/swat/hos)
/obj/structure/closet/secure_closet/hos/Initialize()
if(prob(50))
@@ -116,6 +117,7 @@
/obj/structure/closet/secure_closet/warden
name = "warden's locker"
storage_capacity = 42
req_access = list(access_armory)
closet_appearance = /decl/closet_appearance/secure_closet/security/warden
@@ -148,6 +150,7 @@
/obj/item/device/flashlight/maglight,
/obj/item/device/megaphone,
/obj/item/clothing/mask/gas/half,
/obj/item/clothing/mask/gas/sechailer/swat/warden,
/obj/item/weapon/gun/projectile/revolvershotgun,
/obj/item/ammo_magazine/m12gdrumjack/beanbag,
/obj/item/ammo_magazine/m12gdrumjack/beanbag)
@@ -419,7 +419,8 @@
/obj/item/clothing/gloves/swat,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/mask/balaclava,
/obj/item/clothing/mask/bandana/skull = 2)
/obj/item/clothing/mask/bandana/skull = 2,
/obj/item/clothing/mask/gas/sechailer/swat)
/obj/structure/closet/wardrobe/suit
@@ -0,0 +1,27 @@
//ert wardrobe override, because these guys really don't need edgy red lockers with CCO dress uniforms, syndi(!!) turtlenecks, two edgy skull bandanas, or facemasks with no sprite. -Killian
/obj/structure/closet/wardrobe/ert
closet_appearance = /decl/closet_appearance/tactical/alt //because ert lockers are red for some dumb reason
starts_with = list(
/obj/item/clothing/under/ert,
/obj/item/device/radio/headset/ert/alt,
/obj/item/clothing/glasses/sunglasses,
/obj/item/clothing/shoes/boots/swat,
/obj/item/clothing/gloves/swat,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/mask/balaclava)
//would you believe mercs have no official locker? well, now they do. basically just a rebranded ERT locker but hey, it's an option. -Killian
/obj/structure/closet/wardrobe/merc
name = "mercenary equipment"
closet_appearance = /decl/closet_appearance/tactical
starts_with = list(
/obj/item/clothing/under/tactical,
/obj/item/clothing/under/syndicate/combat,
/obj/item/device/radio/headset/syndicate/alt,
/obj/item/clothing/glasses/sunglasses,
/obj/item/clothing/shoes/boots/combat,
/obj/item/clothing/gloves/combat,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/mask/balaclava,
/obj/item/clothing/mask/bandana/skull)
+5 -5
View File
@@ -11,8 +11,8 @@
var/current_damage = 0
var/cover = 50 //how much cover the girder provides against projectiles.
var/default_material = DEFAULT_WALL_MATERIAL
var/material/girder_material
var/material/reinf_material
var/datum/material/girder_material
var/datum/material/reinf_material
var/reinforcing = 0
var/applies_material_colour = 1
@@ -226,7 +226,7 @@
to_chat(user, "<span class='notice'>There isn't enough material here to construct a wall.</span>")
return 0
var/material/M = name_to_material[S.default_type]
var/datum/material/M = name_to_material[S.default_type]
if(!istype(M))
return 0
@@ -267,7 +267,7 @@
to_chat(user, "<span class='notice'>There isn't enough material here to reinforce the girder.</span>")
return 0
var/material/M = name_to_material[S.default_type]
var/datum/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
to_chat(user, "You cannot reinforce \the [src] with that; it is too soft.")
return 0
@@ -401,7 +401,7 @@
var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built.
// Apparently set_material(...) for walls requires refs to the material singletons and not strings.
// This is different from how other material objects with their own set_material(...) do it, but whatever.
var/material/M = name_to_material[the_rcd.material_to_use]
var/datum/material/M = name_to_material[the_rcd.material_to_use]
new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material)
new_T.add_hiddenprint(user)
qdel(src)
+1 -1
View File
@@ -17,7 +17,7 @@
var/epitaph = "" //A quick little blurb
// var/dir_locked = 0 //Can it be spun? Not currently implemented
var/material/material
var/datum/material/material
/obj/structure/gravemarker/New(var/newloc, var/material_name)
..(newloc)
+176 -104
View File
@@ -20,8 +20,90 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
var/has_items = FALSE
var/dismantled = TRUE
var/signs = 0 //maximum capacity hardcoded below
var/list/tgui_icons = list()
var/static/list/equippable_item_whitelist
/obj/structure/janitorialcart/proc/equip_janicart_item(mob/user, obj/item/I)
if(!equippable_item_whitelist)
equippable_item_whitelist = typecacheof(list(
/obj/item/weapon/storage/bag/trash,
/obj/item/weapon/mop,
/obj/item/weapon/reagent_containers/spray,
/obj/item/device/lightreplacer,
/obj/item/clothing/suit/caution,
))
if(!is_type_in_typecache(I, equippable_item_whitelist))
to_chat(user, "<span class='warning'>There's no room in [src] for [I].</span>")
return FALSE
if(!user.unEquip(I, 0, src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand.</span>")
return FALSE
if(istype(I, /obj/item/weapon/storage/bag/trash))
if(mybag)
to_chat(user, "<span class='warning'>[src] already has \an [I].</span>")
return FALSE
mybag = I
setTguiIcon("mybag", mybag)
else if(istype(I, /obj/item/weapon/mop))
if(mymop)
to_chat(user, "<span class='warning'>[src] already has \an [I].</span>")
return FALSE
mymop = I
setTguiIcon("mymop", mymop)
else if(istype(I, /obj/item/weapon/reagent_containers/spray))
if(myspray)
to_chat(user, "<span class='warning'>[src] already has \an [I].</span>")
return FALSE
myspray = I
setTguiIcon("myspray", myspray)
else if(istype(I, /obj/item/device/lightreplacer))
if(myreplacer)
to_chat(user, "<span class='warning'>[src] already has \an [I].</span>")
return FALSE
myreplacer = I
setTguiIcon("myreplacer", myreplacer)
else if(istype(I, /obj/item/clothing/suit/caution))
if(signs < 4)
signs++
setTguiIcon("signs", I)
else
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
return FALSE
else
// This may look like duplicate code, but it's important that we don't call unEquip *and* warn the user if
// something horrible goes wrong. (this else is never supposed to happen)
to_chat(user, "<span class='warning'>There's no room in [src] for [I].</span>")
return FALSE
update_icon()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
return TRUE
/obj/structure/janitorialcart/proc/setTguiIcon(key, atom/A)
if(!istype(A) || !key)
return
var/icon/F = getFlatIcon(A, defdir = SOUTH, no_anim = TRUE)
tgui_icons["[key]"] = "'data:image/png;base64,[icon2base64(F)]'"
SStgui.update_uis(src)
/obj/structure/janitorialcart/proc/nullTguiIcon(key)
if(!key)
return
tgui_icons.Remove(key)
SStgui.update_uis(src)
/obj/structure/janitorialcart/proc/clearTguiIcons()
tgui_icons.Cut()
SStgui.update_uis(src)
/obj/structure/janitorialcart/Destroy()
QDEL_NULL(mybag)
@@ -29,20 +111,22 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
QDEL_NULL(myspray)
QDEL_NULL(myreplacer)
QDEL_NULL(mybucket)
clearTguiIcons()
return ..()
/obj/structure/janitorialcart/examine(mob/user)
if(..(user, 1))
if (mybucket)
var/contains = mybucket.reagents.total_volume
to_chat(user, "\icon[src] The bucket contains [contains] unit\s of liquid!")
else
to_chat(user, "\icon[src] There is no bucket mounted on it!")
. = ..(user)
if(istype(mybucket))
var/contains = mybucket.reagents.total_volume
. += "[bicon(src)] The bucket contains [contains] unit\s of liquid!"
else
. += "[bicon(src)] There is no bucket mounted on it!"
/obj/structure/janitorialcart/MouseDrop_T(atom/movable/O as mob|obj, mob/living/user as mob)
if (istype(O, /obj/structure/mopbucket) && !mybucket)
O.forceMove(src)
mybucket = O
setTguiIcon("mybucket", mybucket)
to_chat(user, "You mount the [O] on the janicart.")
update_icon()
else
@@ -70,38 +154,19 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
return 1
else if(istype(I, /obj/item/weapon/reagent_containers/spray) && !myspray)
user.unEquip(I, 0, src)
myspray = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
equip_janicart_item(user, I)
return 1
else if(istype(I, /obj/item/device/lightreplacer) && !myreplacer)
user.unEquip(I, 0, src)
myreplacer = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
equip_janicart_item(user, I)
return 1
else if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag)
user.unEquip(I, 0, src)
mybag = I
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
equip_janicart_item(user, I)
return 1
else if(istype(I, /obj/item/clothing/suit/caution))
if(signs < 4)
user.unEquip(I, 0, src)
signs++
update_icon()
updateUsrDialog()
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
else
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
equip_janicart_item(user, I)
return 1
else if(mybag)
@@ -124,16 +189,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
if(user.incapacitated() || !Adjacent(user)) return
var/obj/I = usr.get_active_hand()
if(istype(I, /obj/item/weapon/mop))
if(!mymop)
usr.drop_from_inventory(I,src)
mymop = I
update_icon()
updateUsrDialog()
to_chat(usr, "<span class='notice'>You put [I] into [src].</span>")
update_icon()
else
to_chat(usr, "<span class='notice'>The cart already has a mop attached</span>")
return
equip_janicart_item(user, I)
else if(istype(I, /obj/item/weapon/reagent_containers) && mybucket)
var/obj/item/weapon/reagent_containers/C = I
C.afterattack(mybucket, usr, 1)
@@ -141,75 +197,95 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/janitorialcart/attack_hand(mob/user)
ui_interact(user)
tgui_interact(user)
return
/obj/structure/janitorialcart/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = TRUE)
var/data[0]
data["name"] = capitalize(name)
data["bag"] = mybag ? capitalize(mybag.name) : null
data["bucket"] = mybucket ? capitalize(mybucket.name) : null
data["mop"] = mymop ? capitalize(mymop.name) : null
data["spray"] = myspray ? capitalize(myspray.name) : null
data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null
data["signs"] = signs ? "[signs] sign\s" : null
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
/obj/structure/janitorialcart/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160)
ui.set_initial_data(data)
ui = new(user, src, "JanitorCart", name) // 240, 160
ui.set_autoupdate(FALSE)
ui.open()
/obj/structure/janitorialcart/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
/obj/structure/janitorialcart/Topic(href, href_list)
if(!in_range(src, usr))
return
if(!isliving(usr))
return
var/mob/living/user = usr
data["mybag"] = mybag ? capitalize(mybag.name) : null
data["mybucket"] = mybucket ? capitalize(mybucket.name) : null
data["mymop"] = mymop ? capitalize(mymop.name) : null
data["myspray"] = myspray ? capitalize(myspray.name) : null
data["myreplacer"] = myreplacer ? capitalize(myreplacer.name) : null
data["signs"] = signs ? "[signs] sign\s" : null
if(href_list["take"])
switch(href_list["take"])
if("garbage")
if(mybag)
user.put_in_hands(mybag)
to_chat(user, "<span class='notice'>You take [mybag] from [src].</span>")
mybag = null
if("mop")
if(mymop)
user.put_in_hands(mymop)
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
mymop = null
if("spray")
if(myspray)
user.put_in_hands(myspray)
to_chat(user, "<span class='notice'>You take [myspray] from [src].</span>")
myspray = null
if("replacer")
if(myreplacer)
user.put_in_hands(myreplacer)
to_chat(user, "<span class='notice'>You take [myreplacer] from [src].</span>")
myreplacer = null
if("sign")
if(signs)
var/obj/item/clothing/suit/caution/Sign = locate() in src
if(Sign)
user.put_in_hands(Sign)
to_chat(user, "<span class='notice'>You take \a [Sign] from [src].</span>")
signs--
else
warning("[src] signs ([signs]) didn't match contents")
signs = 0
if("bucket")
if(mybucket)
mybucket.forceMove(get_turf(user))
to_chat(user, "<span class='notice'>You unmount [mybucket] from [src].</span>")
mybucket = null
data["icons"] = tgui_icons
return data
/obj/structure/janitorialcart/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return TRUE
var/obj/item/I = usr.get_active_hand()
switch(action)
if("bag")
if(mybag)
usr.put_in_hands(mybag)
to_chat(usr, "<span class='notice'>You take [mybag] from [src].</span>")
mybag = null
nullTguiIcon("mybag")
else if(is_type_in_typecache(I, equippable_item_whitelist))
equip_janicart_item(usr, I)
if("mop")
if(mymop)
usr.put_in_hands(mymop)
to_chat(usr, "<span class='notice'>You take [mymop] from [src].</span>")
mymop = null
nullTguiIcon("mymop")
else if(is_type_in_typecache(I, equippable_item_whitelist))
equip_janicart_item(usr, I)
if("spray")
if(myspray)
usr.put_in_hands(myspray)
to_chat(usr, "<span class='notice'>You take [myspray] from [src].</span>")
myspray = null
nullTguiIcon("myspray")
else if(is_type_in_typecache(I, equippable_item_whitelist))
equip_janicart_item(usr, I)
if("replacer")
if(myreplacer)
usr.put_in_hands(myreplacer)
to_chat(usr, "<span class='notice'>You take [myreplacer] from [src].</span>")
myreplacer = null
nullTguiIcon("myreplacer")
else if(is_type_in_typecache(I, equippable_item_whitelist))
equip_janicart_item(usr, I)
if("sign")
if(istype(I, /obj/item/clothing/suit/caution) && signs < 4)
equip_janicart_item(usr, I)
else if(signs)
var/obj/item/clothing/suit/caution/sign = locate() in src
if(sign)
usr.put_in_hands(sign)
to_chat(usr, "<span class='notice'>You take \a [sign] from [src].</span>")
signs--
if(!signs)
nullTguiIcon("signs")
else
to_chat(usr, "<span class='notice'>[src] doesn't have any signs left.</span>")
if("bucket")
if(mybucket)
mybucket.forceMove(get_turf(usr))
to_chat(usr, "<span class='notice'>You unmount [mybucket] from [src].</span>")
mybucket = null
nullTguiIcon("mybucket")
else
to_chat(usr, "<span class='notice'>((Drag and drop a mop bucket onto [src] to equip it.))</span>")
return FALSE
else
return FALSE
update_icon()
updateUsrDialog()
return TRUE
/obj/structure/janitorialcart/update_icon()
overlays.Cut()
@@ -229,11 +305,6 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
if(signs)
overlays += "cart_sign[signs]"
//This is called if the cart is caught in an explosion, or destroyed by weapon fire
/obj/structure/janitorialcart/proc/spill(var/chance = 100)
var/turf/dropspot = get_turf(src)
@@ -275,6 +346,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
mybag = null
update_icon()
clearTguiIcons()
+1 -1
View File
@@ -172,7 +172,7 @@ obj/structure/safe/ex_act(severity)
icon_state = "floorsafe"
density = 0
level = 1 //underfloor
plane = TURF_PLANE
plane = PLATING_PLANE
layer = ABOVE_UTILITY
/obj/structure/safe/floor/Initialize()
+1 -1
View File
@@ -7,7 +7,7 @@
icon = 'icons/obj/doors/material_doors.dmi'
icon_state = "metal"
var/material/material
var/datum/material/material
var/state = 0 //closed, 1 == open
var/isSwitchingStates = 0
var/hardness = 1
@@ -1,4 +1,4 @@
/material/flockium
/datum/material/flockium
name = "flockium"
//stack_type = /obj/item/stack/material/sandstone
icon_base = "flock"
@@ -17,8 +17,8 @@
can_buckle = 1
buckle_dir = SOUTH
buckle_lying = 1
var/material/material
var/material/padding_material
var/datum/material/material
var/datum/material/padding_material
var/base_icon = "bed"
var/applies_material_colour = 1
@@ -226,7 +226,7 @@
/obj/structure/bed/chair/sofa/update_icon()
if(applies_material_colour && sofa_material)
var/material/color_material = get_material_by_name(sofa_material)
var/datum/material/color_material = get_material_by_name(sofa_material)
color = color_material.icon_colour
if(sofa_material == "carpet")
@@ -12,8 +12,8 @@ var/global/list/stool_cache = list() //haha stool
throwforce = 10
w_class = ITEMSIZE_HUGE
var/base_icon = "stool_base"
var/material/material
var/material/padding_material
var/datum/material/material
var/datum/material/padding_material
/obj/item/weapon/stool/padded
icon_state = "stool_padded_preview" //set for the map
@@ -67,7 +67,7 @@
if(!UWC)
return
var/datum/category_item/underwear/selected_underwear = input(H, "Choose underwear:", "Choose underwear", H.all_underwear[UWC.name]) as null|anything in UWC.items
if(selected_underwear && CanUseTopic(H, default_state))
if(selected_underwear && CanUseTopic(H, GLOB.tgui_default_state))
H.all_underwear[UWC.name] = selected_underwear
H.hide_underwear[UWC.name] = FALSE
. = TRUE