mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-31 00:59:16 +01:00
Bugfixes (#8967)
* 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:
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
for(var/mat in stored_material)
|
||||
var/datum/material/M = get_material_by_name(mat)
|
||||
if(!istype(M))
|
||||
continue
|
||||
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
|
||||
if(stored_material[mat] > S.perunit)
|
||||
S.amount = round(stored_material[mat] / S.perunit)
|
||||
else
|
||||
qdel(S)
|
||||
..()
|
||||
return 1
|
||||
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)
|
||||
S.amount = round(stored_material[mat] / S.perunit)
|
||||
else
|
||||
qdel(S) //Prevents stacks smaller than 1
|
||||
return ..()
|
||||
@@ -17,17 +17,19 @@
|
||||
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)
|
||||
cell = new cell_type(src)
|
||||
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]
|
||||
else
|
||||
verbs -= /obj/item/flashlight/verb/toggle
|
||||
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/Destroy()
|
||||
@@ -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."
|
||||
|
||||
@@ -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,7 +33,8 @@
|
||||
|
||||
/obj/item/suit_cooling_unit/Initialize()
|
||||
. = ..()
|
||||
cell = new/obj/item/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
||||
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()
|
||||
QDEL_NULL(cell)
|
||||
@@ -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
|
||||
@@ -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()]."
|
||||
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user