Merge pull request #4613 from Citadel-Station-13/upstream-merge-33945

[MIRROR] Improves loot drop spawners, adds AI law spawners to cores
This commit is contained in:
LetterJay
2017-12-31 02:52:44 -06:00
committed by GitHub
6 changed files with 58 additions and 53 deletions
+3 -2
View File
@@ -22174,7 +22174,8 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/full/corp,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/structure/window/reinforced{
dir = 1
},
@@ -22235,7 +22236,7 @@
},
/obj/item/aiModule/reset/purge,
/obj/structure/window/reinforced,
/obj/item/aiModule/core/full/antimov,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/structure/window/reinforced{
dir = 1
},
+18 -22
View File
@@ -54219,14 +54219,10 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/full/paladin{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/corp{
pixel_x = -3;
pixel_y = -3
/obj/effect/spawner/lootdrop/aimodule_harmless{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 3
},
/obj/structure/sign/nanotrasen{
pixel_x = -32
@@ -54279,12 +54275,12 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/full/antimov{
pixel_x = 3;
pixel_y = 3
/obj/effect/spawner/lootdrop/aimodule_harmful{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 2
},
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/supplied/protectStation{
/obj/item/aiModule/supplied/oxygen{
pixel_x = -3;
pixel_y = -3
},
@@ -55144,6 +55140,10 @@
pixel_y = 3
},
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/full/asimov{
pixel_x = -3;
pixel_y = -3
},
/turf/open/floor/plasteel/vault{
dir = 8
},
@@ -55226,7 +55226,7 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/full/tyrant{
/obj/item/aiModule/supplied/protectStation{
pixel_x = 3;
pixel_y = 3
},
@@ -57252,14 +57252,10 @@
/area/ai_monitored/turret_protected/ai_upload)
"clQ" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/core/full/drone{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/liveandletlive{
pixel_x = -3;
pixel_y = -3
/obj/effect/spawner/lootdrop/aimodule_neutral{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 3
},
/turf/open/floor/plasteel/vault{
dir = 8
+3 -2
View File
@@ -18443,6 +18443,7 @@
"aMG" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/item/aiModule/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
@@ -18452,7 +18453,7 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/full/corp,
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/item/aiModule/core/full/custom,
/obj/machinery/flasher{
pixel_y = 24;
@@ -18477,7 +18478,7 @@
pixel_y = 24;
id = "AI"
},
/obj/item/aiModule/core/full/antimov,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/supplied/protectStation,
/obj/item/aiModule/zeroth/oneHuman,
+18 -22
View File
@@ -2376,14 +2376,10 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/full/paladin{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/asimov,
/obj/item/aiModule/core/full/corp{
pixel_x = -3;
pixel_y = -3
/obj/effect/spawner/lootdrop/aimodule_harmless{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 3
},
/obj/structure/sign/nanotrasen{
pixel_x = -32
@@ -2499,12 +2495,12 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/full/antimov{
pixel_x = 3;
pixel_y = 3
/obj/effect/spawner/lootdrop/aimodule_harmful{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 2
},
/obj/item/aiModule/supplied/oxygen,
/obj/item/aiModule/supplied/protectStation{
/obj/item/aiModule/supplied/oxygen{
pixel_x = -3;
pixel_y = -3
},
@@ -2875,6 +2871,10 @@
pixel_y = 3
},
/obj/item/aiModule/core/full/custom,
/obj/item/aiModule/core/full/asimov{
pixel_x = -3;
pixel_y = -3
},
/obj/machinery/camera{
c_tag = "AI Core - Port";
dir = 4;
@@ -2900,7 +2900,7 @@
req_access_txt = "20"
},
/obj/structure/window/reinforced,
/obj/item/aiModule/core/full/tyrant{
/obj/item/aiModule/supplied/protectStation{
pixel_x = 3;
pixel_y = 3
},
@@ -4361,14 +4361,10 @@
/area/ai_monitored/turret_protected/ai)
"ahV" = (
/obj/structure/table/reinforced,
/obj/item/aiModule/core/full/drone{
pixel_x = 3;
pixel_y = 3
},
/obj/item/aiModule/core/full/reporter,
/obj/item/aiModule/core/full/liveandletlive{
pixel_x = -3;
pixel_y = -3
/obj/effect/spawner/lootdrop/aimodule_neutral{
fan_out_items = 1;
lootdoubles = 0;
lootcount = 3
},
/turf/open/floor/plasteel/vault{
dir = 8
@@ -12140,6 +12140,7 @@
"aED" = (
/obj/structure/table,
/obj/item/aiModule/core/full/asimov,
/obj/effect/spawner/lootdrop/aimodule_harmless,
/obj/item/aiModule/core/freeformcore,
/obj/machinery/door/window{
base_state = "right";
@@ -12148,7 +12149,7 @@
name = "Core Modules";
req_access_txt = "20"
},
/obj/item/aiModule/core/full/corp,
/obj/effect/spawner/lootdrop/aimodule_neutral,
/obj/item/aiModule/core/full/custom,
/obj/structure/window/reinforced{
dir = 1;
@@ -12197,7 +12198,7 @@
req_access_txt = "20"
},
/obj/item/aiModule/reset/purge,
/obj/item/aiModule/core/full/antimov,
/obj/effect/spawner/lootdrop/aimodule_harmful,
/obj/item/aiModule/supplied/protectStation,
/obj/structure/window/reinforced{
dir = 1;
+13 -3
View File
@@ -5,19 +5,29 @@
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = TRUE //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,3,-3,6,-6,9,-9.. This overrides pixel_x/y on the spawner itself
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
var/turf/T = get_turf(src)
while(lootcount && loot.len)
var/loot_spawned = 0
while((lootcount-loot_spawned) && loot.len)
var/lootspawn = pickweight(loot)
if(!lootdoubles)
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(T)
lootcount--
var/atom/movable/spawned_loot = new lootspawn(T)
if (!fan_out_items)
if (pixel_x != 0)
spawned_loot.pixel_x = pixel_x
if (pixel_y != 0)
spawned_loot.pixel_y = pixel_y
else
if (loot_spawned)
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-3)+((loot_spawned%2)*(loot_spawned+1)/2*3)
loot_spawned++
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/lootdrop/armory_contraband