mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-13 02:52:03 +00:00
* coefficient balancing * damage and meltdowns * meltdown stuff * alert stuff * lots of work - whew * some enrichment code * rod encrichmnt * working on enrichment * more fabrication * rod fab * start to the nuke * overload sprites * overload code work * some overload tweaking * small tweak * coolant ejections and QOL things * overheat events + ripley gripper * rebase + venting code * save before rebase * some pre-work for rods * finishing the base rods * fixed my dme * de linting * tiny lint fix * more lint fixes * linting * linting * linting * linting * linting * temp delint * temp delint * undo TM stuff + minor fix * didnt save * some fixes * fixes * fixes and engine repair * fixed broken durability decay * LOTS of things * tgui * lint * linter * linter * minor shit * Update boxstation.dmm * major refactors and fixes * saved this * critical testing tweaks and fixes * fixes and tweaks * smithing start * forgot to save * craftables + grill start * saved * fix * more grill work * Update tgui.bundle.js * linter * linter * fixes * rod fabricator initial * cooking work * push * soundwork * sound work tweak * comments + sounds + toxins gen rework * lots of work * sprite stuff * deconflicting * delinting * bundle rebuild * prettier * feex * fuck you OD * who asked? * update to tgui * another edit to tgui * finish tgui * remove debug metadata button * rod tweaks for tgui * Update code/datums/uplink_items/uplink_traitor.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/game/mecha/equipment/tools/work_tools.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/game/mecha/equipment/tools/work_tools.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/game/objects/items/robot/cyborg_gripper.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/parrot.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/parrot.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/parrot.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/parrot.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_misc.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_misc.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_misc.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/reactor.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/reactor.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/reactor.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/smithing/components/misc_components.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update tgui/packages/tgui/interfaces/NuclearRodFabricator.jsx Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Spans * tgui build * rod redo * improve tgui for fabricator * sprites and centrifuge/fab work * tgui update * spritework * cyberiad + hydrogen conversion * kerberos + counter * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * sprite + fab tweak * tgui bundle * lintering * bugfixing * linting * linting * event tweak * add missing gases to fission monitor * issue fixing * sprite/overlay fixes * mapping * stations again * space lattice * tine tweak * linter * no rod alerts * buttons * loose wire * make it so you can interact through rod casings and the uhh big thing in the center, what's that called again * fixes * door fix * many bug fixes + crates * fab ghost touch * water convert + maint sprite + fixes * pack changes + neighbor fix * doors rename * didnt save * hydrogen fix * map tweaks * repair fixes + corium LETHALITY * upped broken rad damage * pipe rename + overload icons * more roundstart moderators * rod tree tweaks * tweaks * pack and enrichment fixes * misc tweaks and fixes * fixes: Density, circuits, coolant offline negation * Apply suggestions from code review Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * review changes * linter + fix * reviews and fixes * LOTS of tweaks and changes * supermatter kit * spacematter balance * tgui * fixes and tweaks * didnt save this * mapping + smith fix * cargo rods arnt radioactive til opened * Apply suggestions from code review Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * review items * fixes * linters * moving components out of nullspace * examine fix * Update tgui.bundle.js * explosion nerf and minor fix * Apply suggestions from code review Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * reviews * map fix + ripley rad immune * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * review * fix chamber examine * tweaks + rod fab disk drop * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * review changes * Update code/modules/power/engines/fission/nuclear_rods.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * fixes * tgui bundle * small rod tweaks * Update code/game/machinery/computer/buildandrepair.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/smithing/components/reactor_components.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/reactor_machines.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/power/engines/fission/reactor_machines.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * reviews * Update code/modules/power/engines/fission/reactor_machines.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Paul <pmerkamp@gmail.com> Co-authored-by: Pooble <90473506+poobsie@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
82 lines
2.9 KiB
Plaintext
82 lines
2.9 KiB
Plaintext
///Lets multitile objects have dense walls around them based on the coordinate map
|
|
/datum/component/multitile
|
|
///Reference to all fillers
|
|
var/list/all_fillers = list()
|
|
|
|
/*
|
|
* These should all be done in this style. It represents a coordinate map of the grid around `src`.
|
|
* The src itself should always have no density, as the density should be set on the atom and not with a filler
|
|
* list(
|
|
list(0, 0, 0, 0, 0),
|
|
list(0, 0, 0, 0, 0),
|
|
list(0, 0, MACH_CENTER, 0, 0),
|
|
list(0, 0, 0, 0, 0),
|
|
list(0, 0, 0, 0, 0)
|
|
)
|
|
*/
|
|
|
|
//distance_from_center does not include src itself
|
|
/datum/component/multitile/Initialize(new_filler_map)
|
|
if(!length(new_filler_map))
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
if(!isatom(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
var/max_height = length(new_filler_map)
|
|
var/max_width = length(new_filler_map[1]) //it should have the same length on every row
|
|
|
|
var/offset_x = 0
|
|
var/offset_y = 0
|
|
|
|
var/atom/owner = parent
|
|
|
|
for(var/i in 1 to length(new_filler_map))
|
|
if(length(new_filler_map[i] != max_width))
|
|
stack_trace("A multitile component was passed a list wich did not have the same length every row. Atom parent is: [parent]")
|
|
var/obj/machinery/machine = parent
|
|
machine.deconstruct()
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
for(var/j in 1 to length(new_filler_map[i]))
|
|
if(new_filler_map[i][j] == MACH_CENTER)
|
|
offset_x = j - ((length(new_filler_map[i]) + 1) / 2)
|
|
offset_y = i - ((length(new_filler_map) + 1) / 2)
|
|
|
|
var/distance_from_center_x = (max_width - 1) / 2
|
|
var/distance_from_center_y = (max_height - 1) / 2
|
|
|
|
if(owner.x - offset_x + distance_from_center_x > world.maxx || owner.x + offset_x - distance_from_center_x < 1)
|
|
var/obj/machinery/machine = parent
|
|
machine.deconstruct()
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
if(owner.y + offset_y + distance_from_center_y > world.maxy || owner.y - offset_y - distance_from_center_y < 1)
|
|
var/obj/machinery/machine = parent
|
|
machine.deconstruct()
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
var/current_height = 0
|
|
var/current_width = 1
|
|
var/tile_index = 1
|
|
|
|
for(var/turf/filler_turf as anything in block(
|
|
owner.x - offset_x - distance_from_center_x, owner.y + offset_y - distance_from_center_y, owner.z,
|
|
owner.x - offset_x + distance_from_center_x, owner.y + offset_y + distance_from_center_y, owner.z,
|
|
))
|
|
//Last check is for filler row lists of length 1.
|
|
if(new_filler_map[max_height - current_height][current_width] == 1) // Because the `block()` proc always works from the bottom left to the top right, we have to loop through our list in reverse
|
|
var/obj/structure/filler/new_filler = new(filler_turf)
|
|
all_fillers += new_filler
|
|
new_filler.parent = owner
|
|
current_width += 1
|
|
tile_index++
|
|
if(tile_index % max_width == 1)
|
|
current_height += 1
|
|
current_width = 1
|
|
if(current_height == max_height)
|
|
break
|
|
|
|
/datum/component/multitile/Destroy(force, silent)
|
|
QDEL_LIST_CONTENTS(all_fillers)
|
|
return ..()
|