mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into space_allocation
This commit is contained in:
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
/obj/effect/biomass
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "stage1"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 20 //DEBUG
|
||||
plane = HUD_PLANE //DEBUG
|
||||
var/health = 10
|
||||
var/stage = 1
|
||||
var/obj/effect/rift/originalRift = null //the originating rift of that biomass
|
||||
var/maxDistance = 15 //the maximum length of a thread
|
||||
var/newSpreadDistance = 10 //the length of a thread at which new ones are created
|
||||
var/curDistance = 1 //the current length of a thread
|
||||
var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
|
||||
var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
|
||||
|
||||
/obj/effect/rift
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "rift"
|
||||
var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
|
||||
var/newicon = 1 //DEBUG
|
||||
|
||||
/obj/effect/rift/New()
|
||||
set background = 1
|
||||
|
||||
..()
|
||||
|
||||
for(var/turf/T in orange(1,src))
|
||||
if(!IsValidBiomassLoc(T))
|
||||
continue
|
||||
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
|
||||
starting.dir = get_dir(src,starting)
|
||||
starting.originalRift = src
|
||||
linkedBiomass += starting
|
||||
spawn(1) //DEBUG
|
||||
starting.icon_state = "[newicon]"
|
||||
|
||||
/obj/effect/rift/Del()
|
||||
for(var/obj/effect/biomass/biomass in linkedBiomass)
|
||||
del(biomass)
|
||||
..()
|
||||
|
||||
/obj/effect/biomass/New()
|
||||
set background = 1
|
||||
|
||||
..()
|
||||
if(!IsValidBiomassLoc(loc,src))
|
||||
del(src)
|
||||
return
|
||||
spawn(1) //so that the dir and stuff can be set by the source first
|
||||
if(curDistance >= maxDistance)
|
||||
return
|
||||
switch(dir)
|
||||
if(NORTHWEST)
|
||||
dir = NORTH
|
||||
if(NORTHEAST)
|
||||
dir = EAST
|
||||
if(SOUTHWEST)
|
||||
dir = WEST
|
||||
if(SOUTHEAST)
|
||||
dir = SOUTH
|
||||
sleep(spreadDelay)
|
||||
Spread()
|
||||
|
||||
/obj/effect/biomass/proc/Spread(var/direction = dir)
|
||||
set background = 1
|
||||
var/possibleDirsInt = 0
|
||||
|
||||
for(var/newDirection in cardinal)
|
||||
if(newDirection == turn(direction,180)) //can't go backwards
|
||||
continue
|
||||
var/turf/T = get_step(loc,newDirection)
|
||||
if(!IsValidBiomassLoc(T,src))
|
||||
continue
|
||||
possibleDirsInt |= newDirection
|
||||
|
||||
var/list/possibleDirs = list()
|
||||
|
||||
if(possibleDirsInt & direction)
|
||||
for(var/i=0 , i<continueChance , i++)
|
||||
possibleDirs += direction
|
||||
if(possibleDirsInt & turn(direction,90))
|
||||
possibleDirs += turn(direction,90)
|
||||
if(possibleDirsInt & turn(direction,-90))
|
||||
possibleDirs += turn(direction,-90)
|
||||
|
||||
if(!possibleDirs.len)
|
||||
return
|
||||
|
||||
direction = pick(possibleDirs)
|
||||
|
||||
var/obj/effect/biomass/newBiomass = new /obj/effect/biomass(get_step(src,direction))
|
||||
newBiomass.curDistance = curDistance + 1
|
||||
newBiomass.maxDistance = maxDistance
|
||||
newBiomass.dir = direction
|
||||
newBiomass.originalRift = originalRift
|
||||
newBiomass.icon_state = "[originalRift.newicon]" //DEBUG
|
||||
originalRift.linkedBiomass += newBiomass
|
||||
|
||||
if(!(curDistance%newSpreadDistance))
|
||||
var/obj/effect/rift/newrift = new /obj/effect/rift(loc)
|
||||
if(originalRift.newicon <= 3)
|
||||
newrift.newicon = originalRift.newicon + 1
|
||||
// NewSpread()
|
||||
|
||||
/obj/effect/biomass/proc/NewSpread(maxDistance = 15)
|
||||
set background = 1
|
||||
for(var/turf/T in orange(1,src))
|
||||
if(!IsValidBiomassLoc(T,src))
|
||||
continue
|
||||
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
|
||||
starting.dir = get_dir(src,starting)
|
||||
starting.maxDistance = maxDistance
|
||||
|
||||
/proc/IsValidBiomassLoc(turf/location,obj/effect/biomass/source = null)
|
||||
set background = 1
|
||||
for(var/obj/effect/biomass/biomass in location)
|
||||
if(biomass != source)
|
||||
return 0
|
||||
if(istype(location,/turf/space))
|
||||
return 0
|
||||
if(location.density)
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
@@ -18,6 +18,12 @@
|
||||
ID = new /obj/item/weapon/card/id
|
||||
ID.access = get_region_accesses(region_access)
|
||||
|
||||
/obj/item/weapon/door_remote/Destroy()
|
||||
if(ID)
|
||||
qdel(ID)
|
||||
ID = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/door_remote/attack_self(mob/user)
|
||||
switch(mode)
|
||||
if(WAND_OPEN)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
|
||||
origin_tech = "combat=1"
|
||||
origin_tech = "magnets=2"
|
||||
var/turf/pointer_loc
|
||||
var/energy = 5
|
||||
var/max_energy = 5
|
||||
var/effectchance = 33
|
||||
@@ -35,6 +34,12 @@
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/device/laser_pointer/Destroy()
|
||||
if(diode)
|
||||
qdel(diode)
|
||||
diode = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
|
||||
|
||||
@@ -24,9 +24,13 @@
|
||||
overlays += "pai-off"
|
||||
|
||||
/obj/item/device/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
if(!isnull(pai))
|
||||
pai.death(0)
|
||||
if(pai)
|
||||
pai.ghostize()
|
||||
qdel(pai)
|
||||
pai = null
|
||||
if(radio)
|
||||
qdel(radio)
|
||||
radio = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/paicard/attack_self(mob/user)
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
mytape = new /obj/item/device/tape/random(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/Destroy()
|
||||
if(mytape)
|
||||
qdel(mytape)
|
||||
mytape = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
@@ -283,7 +289,8 @@
|
||||
timestamp.Cut()
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
overlays += "ribbonoverlay"
|
||||
if(!ruined)
|
||||
overlays += "ribbonoverlay"
|
||||
ruined = 1
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,18 @@
|
||||
var/toggle = 1
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
/obj/item/device/transfer_valve/Destroy()
|
||||
if(tank_one)
|
||||
qdel(tank_one)
|
||||
tank_one = null
|
||||
if(tank_two)
|
||||
qdel(tank_two)
|
||||
tank_two = null
|
||||
if(attached_device)
|
||||
qdel(attached_device)
|
||||
attached_device = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
|
||||
|
||||
/obj/item/device/transfer_valve/IsAssemblyHolder()
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
var/state
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
|
||||
/obj/item/latexballon/Destroy()
|
||||
if(air_contents)
|
||||
qdel(air_contents)
|
||||
air_contents = null
|
||||
return ..()
|
||||
|
||||
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user)
|
||||
if(icon_state == "latexballon_bursted")
|
||||
return
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
if(amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
if(istype(O,/obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
M.amount--
|
||||
if(M.amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
del(M)
|
||||
qdel(M)
|
||||
amount--
|
||||
new/obj/item/stack/tile/light(user.loc)
|
||||
if(amount <= 0)
|
||||
user.unEquip(src, 1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
/obj/item/stack/Destroy()
|
||||
if(usr && usr.machine == src)
|
||||
usr << browse(null, "window=stack")
|
||||
return ..()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW // because qdel'd stacks act strange for cyborgs
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
@@ -111,7 +112,7 @@
|
||||
|
||||
if(href_list["make"])
|
||||
if(amount < 1)
|
||||
del(src) //Never should happen
|
||||
qdel(src) //Never should happen
|
||||
|
||||
var/list/recipes_list = recipes
|
||||
if(href_list["sublist"])
|
||||
@@ -160,7 +161,7 @@
|
||||
var/oldsrc = src
|
||||
src = null //dont kill proc after del()
|
||||
usr.unEquip(oldsrc, 1)
|
||||
del(oldsrc) // Not qdel, because qdel'd stacks act strange for cyborgs
|
||||
qdel(oldsrc)
|
||||
if(istype(O, /obj/item))
|
||||
usr.put_in_hands(O)
|
||||
|
||||
@@ -168,7 +169,7 @@
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if(istype(O, /obj/item/weapon/storage))
|
||||
for(var/obj/item/I in O)
|
||||
del(I)
|
||||
qdel(I)
|
||||
//BubbleWrap END
|
||||
|
||||
if(src && usr.machine == src) //do not reopen closed window
|
||||
@@ -184,7 +185,7 @@
|
||||
if(usr)
|
||||
usr.unEquip(src, 1)
|
||||
spawn()
|
||||
del(src) // Not qdel, because qdel'd stacks act strange for cyborgs
|
||||
qdel(src)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
var/list/loadedItems = list() //The items loaded into the cannon that will be fired out
|
||||
var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/Destroy()
|
||||
if(tank)
|
||||
qdel(tank)
|
||||
tank = null
|
||||
for(var/obj/item/I in loadedItems)
|
||||
qdel(I)
|
||||
loadedItems.Cut()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/Destroy()
|
||||
if(bcell)
|
||||
qdel(bcell)
|
||||
bcell = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/melee/baton/CheckParts(list/parts_list)
|
||||
..()
|
||||
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
/obj/item/weapon/tank/Destroy()
|
||||
if(air_contents)
|
||||
qdel(air_contents)
|
||||
air_contents = null
|
||||
|
||||
processing_objects.Remove(src)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_opened = "coffin_open"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
@@ -18,4 +19,5 @@
|
||||
icon_state = "sarc"
|
||||
icon_closed = "sarc"
|
||||
icon_opened = "sarc_open"
|
||||
sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
material_drop = /obj/item/stack/sheet/mineral/sandstone
|
||||
@@ -117,12 +117,12 @@
|
||||
/obj/structure/closet/secure_closet/atmos_personal
|
||||
name = "technician's locker"
|
||||
req_access = list(access_atmospherics)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "secureengopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
icon_state = "secureatm1"
|
||||
icon_closed = "secureatm"
|
||||
icon_locked = "secureatm1"
|
||||
icon_opened = "secureatmopen"
|
||||
icon_broken = "secureatmbroken"
|
||||
icon_off = "secureatmoff"
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -341,6 +341,7 @@
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/yeah(src)
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
new /obj/item/clothing/accessory/black(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||
if(broken)
|
||||
|
||||
@@ -168,8 +168,8 @@
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
icon_state = "atmostech"
|
||||
icon_closed = "atmostech"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
..()
|
||||
@@ -193,8 +193,8 @@
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
icon_state = "engineer"
|
||||
icon_closed = "engineer"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user