* bugfix 1: autolathes can actually be deconstructed and don't cause runtimes (and also don't eat your crowbars)

* bugfix 2 (forensic techs actually get detective ids/pdas)

* bugfix 3 (accessories no longer do a weird double period)

* bugfix 4 (right foot)

* bugfix 5 (singular/plural stacks)

* bugfix 6 (ghosts can hang up on communicators -- still causes runtimes but it did this before and the runtimes are from the observer bug and not the communicator bug so it's fine)

* i lost count but this one gives the hos an egun because the cynosure hos locker doesn't have a gun at all and i'm not fucking around with balancing the fancy custom guns

* fixes infinite cell duplication exploit with autolathes (flashlights/coolers come empty from lathe now)

* changelog

* Update code/game/machinery/autolathe.dm

Co-authored-by: Atermonera <atermonera@gmail.com>

* Update code/game/machinery/autolathe.dm

Co-authored-by: Atermonera <atermonera@gmail.com>

* commits changes + fixes retro carpet (red) inventory sprites

* return..()'d

---------

Co-authored-by: Atermonera <atermonera@gmail.com>
This commit is contained in:
Varlaisvea
2023-03-09 02:18:18 +00:00
committed by GitHub
parent dce4648488
commit e11404d103
12 changed files with 92 additions and 25 deletions

View File

@@ -51,7 +51,7 @@
/datum/category_item/autolathe/general/flashlight
name = "flashlight"
path =/obj/item/flashlight
path =/obj/item/flashlight/empty
/datum/category_item/autolathe/general/floor_light
name = "floor light"
@@ -79,7 +79,7 @@
/datum/category_item/autolathe/general/suit_cooler
name = "suit cooling unit"
path =/obj/item/suit_cooling_unit
path =/obj/item/suit_cooling_unit/empty
/datum/category_item/autolathe/general/weldermask
name = "welding mask"

View File

@@ -40,6 +40,13 @@
name = OUTFIT_JOB_NAME("Forensic technician")
uniform = /obj/item/clothing/under/rank/security/forensics
suit = /obj/item/clothing/suit/storage/forensics/blue
shoes = /obj/item/clothing/shoes/laceup
r_hand = /obj/item/storage/briefcase/crimekit
id_type = /obj/item/card/id/security/detective
pda_type = /obj/item/pda/detective
backpack = /obj/item/storage/backpack
satchel_one = /obj/item/storage/backpack/satchel/norm
backpack_contents = list(/obj/item/storage/box/evidence = 1)
/decl/hierarchy/outfit/job/security/officer
name = OUTFIT_JOB_NAME("Security Officer")

View File

@@ -158,10 +158,11 @@
return
if(panel_open)
//Don't eat multitools or wirecutters used on an open lathe.
//Don't eat things when the lathe is open. No more accidentally lathing your jaws of life.
if(O.is_multitool() || O.is_wirecutter())
wires.Interact(user)
return
return TRUE
return FALSE
if(O.loc != user && !(istype(O,/obj/item/stack)))
return 0
@@ -367,14 +368,16 @@
mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.6. Maximum rating of parts is 5
/obj/machinery/autolathe/dismantle()
if(LAZYLEN(stored_material))
for(var/mat in stored_material)
var/datum/material/M = get_material_by_name(mat)
if(!istype(M))
continue
if(stored_material[mat] == 0) //Maybe don't try and make null mats...
continue
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
if(stored_material[mat] > S.perunit)
if(stored_material[mat] >= S.perunit)
S.amount = round(stored_material[mat] / S.perunit)
else
qdel(S)
..()
return 1
qdel(S) //Prevents stacks smaller than 1
return ..()

View File

@@ -17,11 +17,13 @@
var/brightness_level = "medium"
var/power_usage
var/power_use = 1
var/starts_with_cell = TRUE //should it start with a cell?
/obj/item/flashlight/Initialize()
. = ..()
if(power_use && cell_type)
if(starts_with_cell)
cell = new cell_type(src)
brightness_levels = list("low" = 0.25, "medium" = 0.5, "high" = 1)
power_usage = brightness_levels[brightness_level]
@@ -234,6 +236,9 @@
else
..()
/obj/item/flashlight/empty //For autolathes so you can't duplicate infinite cells
starts_with_cell = FALSE
/obj/item/flashlight/pen
name = "penlight"
desc = "A pen-sized light, used by medical staff."

View File

@@ -24,6 +24,7 @@
var/max_cooling = 15 // in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 3 // charge per second at max_cooling
var/thermostat = T20C
var/starts_with_cell = TRUE
//TODO: make it heat up the surroundings when not in space
@@ -32,6 +33,7 @@
/obj/item/suit_cooling_unit/Initialize()
. = ..()
if(starts_with_cell)
cell = new/obj/item/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment
/obj/item/suit_cooling_unit/Destroy()
@@ -203,3 +205,6 @@
. += "The charge meter reads [round(cell.percent())]%."
else
. += "It doesn't have a power cell installed."
/obj/item/suit_cooling_unit/empty //No duplicating cells with autolathes any more.
starts_with_cell = FALSE

View File

@@ -61,7 +61,7 @@
if(Adjacent(user))
if(!uses_charge)
. += "There are [src.amount] [src.singular_name]\s in the stack."
. += "There [src.amount == 1? "is" : "are"] [src.amount] [src.singular_name]\s in the stack."
else
. += "There is enough charge for [get_amount()]."

View File

@@ -107,8 +107,8 @@
if(istype(w_uniform,/obj/item/clothing/under) && !(skip_gear & EXAMINE_SKIPTIE))
var/obj/item/clothing/under/U = w_uniform
if(LAZYLEN(U.accessories))
tie_msg += ". Attached to it is"
tie_msg_warn += "! Attached to it is"
tie_msg += " Attached to it is"
tie_msg_warn += " Attached to it is"
var/list/accessory_descs = list()
if(skip_gear & EXAMINE_SKIPHOLSTER)
for(var/obj/item/clothing/accessory/A in U.accessories)
@@ -139,8 +139,8 @@
if(istype(wear_suit,/obj/item/clothing/suit))
var/obj/item/clothing/suit/U = wear_suit
if(LAZYLEN(U.accessories))
tie_msg += ". Attached to it is"
tie_msg_warn += "! Attached to it is"
tie_msg += " Attached to it is"
tie_msg_warn += " Attached to it is"
var/list/accessory_descs = list()
for(var/accessory in U.accessories)
accessory_descs += "<a href='?src=\ref[src];lookitem_desc_only=\ref[accessory]'>\a [accessory]</a>"

View File

@@ -10,10 +10,12 @@
/mob/living/voice/Initialize(loc)
add_language(LANGUAGE_GALCOM)
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
. = ..()
check_comm()
/mob/living/voice/proc/check_comm() //We have to call this after initialize or it won't register. Still runtimes as of 2023-02-20, mind, but that's an unrelated bug.
if(istype(loc, /obj/item/communicator))
comm = loc
. = ..()
// Proc: transfer_identity()
// Parameters: 1 (speaker - the mob (usually an observer) to copy information from)

View File

@@ -3953,7 +3953,7 @@ shaved
species_allowed = list(SPECIES_TESHARI)
/datum/sprite_accessory/marking/bandage/r_foot/r_foot3
name = "Bandage, Rufgt Foot 3"
name = "Bandage, Right Foot 3"
icon_state = "bandage3"
/datum/sprite_accessory/marking/bandage/r_foot/r_foot3/teshari

View File

@@ -0,0 +1,44 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Varlaisvea
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Autolathes no longer generate infinite cells when making flashlights / suit cooling units."
- bugfix: "Autolathes can now be deconstructed, and won't spawn infinite metal/glass when attempting to do so while depowered."
- bugfix: "Autolathes will no longer eat your tools when the access panel is open."
- bugfix: "Ghosts can now hang up on communicators instead of relying on the caller to do so."
- bugfix: "Forensic Technicians (Detective alt-title) now receive Detective gear (PDA, ID, CSI kit)."
- tweak: "The Head of Security's locker now contains an energy gun again (it was removed when Cynosure was launched)."
- spellcheck: "Stacks will now correctly say 'there is' instead of 'there are' for single items."
- spellcheck: "rugft foot"
- spellcheck: "Accessories won't do the weird double period thing. If you know, you know."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -28,6 +28,7 @@
/obj/item/storage/belt/security,
/obj/item/flash,
/obj/item/melee/baton/loaded,
/obj/item/gun/energy/gun,
/obj/item/cell/device/weapon,
/obj/item/clothing/accessory/holster/waist,
/obj/item/melee/telebaton,