mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 05:36:57 +01:00
fixes infinite morphium duplication exploit (#9046)
* fixes very old exploit that we literally just discovered * this is what i get for speedrunning a bugfix * reworks material ejection code * literally it worked fine this is just so github likes it * 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> * code prettiness --------- Co-authored-by: Atermonera <atermonera@gmail.com>
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
//see /code/modules/materials/fifty_stacks.dm for how this stuff works
|
||||
|
||||
/obj/fiftyspawner/grass
|
||||
/obj/fiftyspawner/grasstiles
|
||||
name = "stack of grass"
|
||||
type_to_spawn = /obj/item/stack/tile/grass
|
||||
|
||||
/obj/fiftyspawner/grass/sif
|
||||
/obj/fiftyspawner/grasstiles/sif
|
||||
name = "stack of sifgrass"
|
||||
type_to_spawn = /obj/item/stack/tile/grass/sif
|
||||
|
||||
/obj/fiftyspawner/grass/sif/forest
|
||||
/obj/fiftyspawner/grasstiles/sif/forest
|
||||
name = "stack of sifgrass"
|
||||
type_to_spawn = /obj/item/stack/tile/grass/sif/forest
|
||||
|
||||
/obj/fiftyspawner/wood
|
||||
/obj/fiftyspawner/woodtiles
|
||||
name = "stack of wood"
|
||||
type_to_spawn = /obj/item/stack/tile/wood
|
||||
|
||||
/obj/fiftyspawner/wood/sif
|
||||
/obj/fiftyspawner/woodtiles/sif
|
||||
name = "stack of alien wood"
|
||||
type_to_spawn = /obj/item/stack/tile/wood/sif
|
||||
|
||||
|
||||
@@ -20,25 +20,14 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
//crafting / welding vars
|
||||
var/datum/material/material //*sigh* i guess this is how we're doing this.
|
||||
var/craftable = FALSE //set to TRUE for tiles you can craft stuff from directly, like grass
|
||||
//welding vars
|
||||
var/can_weld = FALSE //set to TRUE for tiles you can reforge into their components via welding, like metal
|
||||
var/welds_into = /obj/item/stack/material/steel //what you get from the welding. defaults to steel.
|
||||
var/default_type = DEFAULT_WALL_MATERIAL
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/tile/Initialize()
|
||||
. = ..()
|
||||
randpixel_xy()
|
||||
if(craftable)
|
||||
material = get_material_by_name("[default_type]")
|
||||
if(!material)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
if(material) //sanity check
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
|
||||
/obj/item/stack/tile/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
@@ -73,7 +62,6 @@
|
||||
singular_name = "grass floor tile"
|
||||
desc = "A patch of grass like they often use on golf courses."
|
||||
icon_state = "tile_grass"
|
||||
default_type = "grass"
|
||||
force = 1.0
|
||||
throwforce = 1.0
|
||||
throw_speed = 5
|
||||
@@ -83,7 +71,6 @@
|
||||
no_variants = FALSE
|
||||
drop_sound = 'sound/items/drop/herb.ogg'
|
||||
pickup_sound = 'sound/items/pickup/herb.ogg'
|
||||
craftable = TRUE
|
||||
|
||||
/obj/item/stack/tile/grass/sif
|
||||
name = "sivian grass tile"
|
||||
|
||||
Reference in New Issue
Block a user