Skip to content

Commit

Permalink
Merge branch 'master' into plant
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeKuwait authored Aug 12, 2023
2 parents 8e627a3 + 499a639 commit 0071667
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 46 deletions.
52 changes: 23 additions & 29 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Crayon Box
* Cigarette Box
* Cigar Box
* Match Box
* Vial Box
*/

/obj/item/storage/fancy
Expand All @@ -20,9 +22,10 @@
name = "donut box"
desc = "A box where round, heavenly, holey pastries reside."
var/icon_type = "donut"
var/plural = "s"

/obj/item/storage/fancy/update_icon()
icon_state = "[icon_type]box[contents.len]"
icon_state = "[icon_type]box[length(contents)]"

/obj/item/storage/fancy/remove_from_storage(obj/item/W, atom/new_location)
. = ..()
Expand All @@ -32,17 +35,14 @@

/obj/item/storage/fancy/get_examine_text(mob/user)
. = ..()
if(contents.len <= 0)
. += "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
if(!length(contents))
. += "There are no [src.icon_type][plural] left in the box."
else if(length(contents) == 1)
. += "There is one [src.icon_type] left in the box."
else
. += "There are [src.contents.len] [src.icon_type]s in the box."

. += "There are [length(src.contents)] [src.icon_type][plural] in the box."

/*
* Egg Box
*/
// EGG BOX

/obj/item/storage/fancy/egg_box
icon = 'icons/obj/items/food.dmi'
Expand All @@ -59,9 +59,7 @@
new /obj/item/reagent_container/food/snacks/egg(src)
return

/*
* Candle Box
*/
// CANDLE BOX

/obj/item/storage/fancy/candle_box
name = "candle pack"
Expand All @@ -80,9 +78,7 @@
new /obj/item/tool/candle(src)
return

/*
* Crayon Box
*/
// CRAYON BOX

/obj/item/storage/fancy/crayons
name = "box of crayons"
Expand Down Expand Up @@ -120,9 +116,8 @@
return
..()

////////////
//CIG PACK//
////////////
// CIGARETTES BOX

/obj/item/storage/fancy/cigarettes
icon = 'icons/obj/items/cigarettes.dmi'
icon_state = "cigpacket"
Expand Down Expand Up @@ -153,14 +148,14 @@
icon_state = "[initial(icon_state)]"

/obj/item/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
icon_state = "[initial(icon_state)][length(contents)]"
return

/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return

if(M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask)
if(M == user && user.zone_selected == "mouth" && length(contents) > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/C = locate() in src
if(C)
remove_from_storage(C, get_turf(user))
Expand Down Expand Up @@ -223,9 +218,7 @@
default_cig_type = /obj/item/clothing/mask/cigarette/ucigarette
storage_slots = 4

/////////////
//CIGAR BOX//
/////////////
// CIGAR BOX

/obj/item/storage/fancy/cigar
name = "cigar case"
Expand Down Expand Up @@ -253,14 +246,14 @@
icon_state = "[initial(icon_state)]"

/obj/item/storage/fancy/cigar/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
icon_state = "[initial(icon_state)][length(contents)]"
return

/obj/item/storage/fancy/cigar/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return

if(M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask)
if(M == user && user.zone_selected == "mouth" && length(contents) > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/cigar/C = locate() in src
if(C)
remove_from_storage(C, get_turf(user))
Expand All @@ -286,6 +279,8 @@
storage_slots = 1
default_cigar_type = /obj/item/clothing/mask/cigarette/cigar/tarbacks

// MATCH BOX

/obj/item/storage/fancy/cigar/matchbook
name = "\improper Lucky Strikes matchbook"
desc = "A small book of cheap paper matches. Good luck getting them to light. Made by Lucky Strikes, but you'll be anything but lucky when you burn your hand trying to light a match on this."
Expand All @@ -298,6 +293,7 @@
w_class = SIZE_TINY
var/light_chance = 70 //how likely you are to light the match on the book
var/burn_chance = 20 //how likely you are to burn yourself once you light it
plural = "es"

/obj/item/storage/fancy/cigar/matchbook/attackby(obj/item/tool/match/W as obj, mob/living/carbon/human/user as mob)
if(!istype(user))
Expand Down Expand Up @@ -340,9 +336,7 @@
light_chance = 60
burn_chance = 40

/*
* Vial Box
*/
// VIAL BOX

/obj/item/storage/fancy/vials
icon = 'icons/obj/items/vialbox.dmi'
Expand Down Expand Up @@ -401,7 +395,7 @@
req_access = list(ACCESS_MARINE_MEDBAY)

/obj/item/storage/lockbox/vials/update_icon(itemremoved = 0)
var/total_contents = src.contents.len - itemremoved
var/total_contents = length(src.contents) - itemremoved
src.icon_state = "vialbox[total_contents]"
src.overlays.Cut()
if (!broken)
Expand Down
7 changes: 0 additions & 7 deletions html/changelogs/AutoChangeLog-pr-4065.yml

This file was deleted.

4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4073.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Huffie56"
delete-after: True
changes:
- spellcheck: "fix typo mistake from matchs to matches."
6 changes: 0 additions & 6 deletions html/changelogs/AutoChangeLog-pr-4137.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4147.yml

This file was deleted.

17 changes: 17 additions & 0 deletions html/changelogs/archive/2023-08.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,20 @@
Zonespace27:
- bugfix: A pile of guns no longer have burst fire (who weren't meant to)
- bugfix: The combichain can now be yanked back if droppeed.
2023-08-12:
BeagleGaming1:
- balance: Defibrillators are guaranteed to deal heart damage on successful revives
- balance: Blood volume now scales with heart damage rather than being a hardcoded
multiplier
- balance: Blood volume oxyloss now scales rather than being a hardcoded loss amount
Huffie56:
- code_imp: added welding google to the com tech tool vendor.
- code_imp: added scaling based on round population to the ColMarTech Surplus Uniform
like the other vendors.
- code_imp: Move every clothing items from ColMarTech Automated Armaments Squad
Vendor to ColMarTech Surplus Uniform Vendor.
- code_imp: rename ColMarTech Automated Armaments Squad Vendor to ColMarTech Automated
Utilities Squad Vendor and add in tools food and other utilities.
Steelpoint:
- bugfix: Synthetic Breaching Hammer will now properly appear on the user's back
when holstered.

0 comments on commit 0071667

Please sign in to comment.