From a0fac5924fdd03e86f2394403e76754c5e02d363 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 14 Nov 2020 18:00:25 +0100 Subject: [PATCH 1/4] e I want my warcrime supply pods to work and not runtime --- code/datums/components/pellet_cloud.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index 6a1028cc65..cc3cc93028 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -55,7 +55,7 @@ var/mob/living/shooter /datum/component/pellet_cloud/Initialize(projectile_type=/obj/item/shrapnel, magnitude=5) - if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent)) + if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent)) return COMPONENT_INCOMPATIBLE if(magnitude < 1) From e0b215614229cde0f4b04722884b4aed4f11609c Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 14 Nov 2020 19:26:54 +0100 Subject: [PATCH 2/4] fixes fixes fixes --- code/__DEFINES/is_helpers.dm | 2 ++ code/datums/components/pellet_cloud.dm | 6 ++++-- code/game/objects/items/miscellaneous.dm | 3 ++- code/modules/cargo/centcom_podlauncher.dm | 11 ++++++----- code/modules/cargo/supplypod.dm | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index ffcb5ac231..ff68f18408 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -188,6 +188,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define islandmine(A) (istype(A, /obj/effect/mine)) +#define issupplypod(A) (istype(A, /obj/structure/closet/supplypod)) + #define isammocasing(A) (istype(A, /obj/item/ammo_casing)) #define isidcard(I) (istype(I, /obj/item/card/id)) diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index cc3cc93028..6404be94c4 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -66,7 +66,7 @@ if(isammocasing(parent)) num_pellets = magnitude - else if(isgrenade(parent) || islandmine(parent)) + else if(isgrenade(parent) || islandmine(parent) || issupplypod(parent)) radius = magnitude /datum/component/pellet_cloud/Destroy(force, silent) @@ -86,9 +86,11 @@ RegisterSignal(parent, COMSIG_GRENADE_PRIME, .proc/create_blast_pellets) else if(islandmine(parent)) RegisterSignal(parent, COMSIG_MINE_TRIGGERED, .proc/create_blast_pellets) + else if(issupplypod(parent)) + RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, .proc/create_blast_pellets) /datum/component/pellet_cloud/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED)) + UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED, COMSIG_SUPPLYPOD_LANDED)) /** * create_casing_pellets() is for directed pellet clouds for ammo casings that have multiple pellets (buckshot and scatter lasers for instance) diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index 2d2c0f31b6..913d73bdad 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -52,7 +52,8 @@ /obj/item/choice_beacon/proc/spawn_option(atom/choice,mob/living/M) var/obj/new_item = create_choice_atom(choice, M) - var/obj/structure/closet/supplypod/bluespacepod/pod = new() + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/bluespacepod/pod = new(pick(get_area_turfs(pod_storage_area))) //Lets just have it in the pod storage zone for a really short time because we don't want it in nullspace pod.explosionSize = list(0,0,0,0) new_item.forceMove(pod) var/msg = "After making your selection, you notice a strange target on the ground. It might be best to step back!" diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm index 500e6d8ffe..77fbd6c6bd 100644 --- a/code/modules/cargo/centcom_podlauncher.dm +++ b/code/modules/cargo/centcom_podlauncher.dm @@ -72,7 +72,7 @@ holder = user_mob.client //if its a mob, assign the mob's client to holder bay = locate(/area/centcom/supplypod/loading/one) in GLOB.sortedAreas //Locate the default bay (one) from the centcom map bayNumber = bay.loading_id //Used as quick reference to what bay we're taking items from - var/area/pod_storage_area = locate(/area/centcom/supplypod/pod_storage) in GLOB.sortedAreas + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas temp_pod = new(pick(get_area_turfs(pod_storage_area))) //Create a new temp_pod in the podStorage area on centcom (so users are free to look at it and change other variables if needed) orderedArea = createOrderedArea(bay) //Order all the turfs in the selected bay (top left to bottom right) to a single list. Used for the "ordered" mode (launchChoice = 1) selector = new(null, holder.mob) @@ -638,7 +638,7 @@ refreshView() /area/centcom/supplypod/pod_storage/Initialize(mapload) //temp_pod holding area - . = ..() + . = ..() var/obj/imgbound = locate() in locate(200,SUPPLYPOD_X_OFFSET*-4.5, 1) call(GLOB.podlauncher, "RegisterSignal")(imgbound, "ct[GLOB.podstyles[14][9]]", "[GLOB.podstyles[14][10]]dlauncher") @@ -702,10 +702,11 @@ /datum/centcom_podlauncher/proc/launch(turf/target_turf) //Game time started if (isnull(target_turf)) return - var/obj/structure/closet/supplypod/centcompod/toLaunch = DuplicateObject(temp_pod) //Duplicate the temp_pod (which we have been varediting or configuring with the UI) and store the result + var/obj/structure/closet/supplypod/centcompod/toLaunch = DuplicateObject(temp_pod, sameloc = TRUE) //Duplicate the temp_pod (which we have been varediting or configuring with the UI) and store the result toLaunch.update_icon()//we update_icon() here so that the door doesnt "flicker on" right after it lands - var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/supplypod_temp_holding] - toLaunch.forceMove(shippingLane) + //We don't have this area, lets just have it where we had the temp pod + //var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/supplypod_temp_holding] + //toLaunch.forceMove(shippingLane) if (launchClone) //We arent launching the actual items from the bay, rather we are creating clones and launching those if(launchRandomItem) var/launch_candidate = pick_n_take(launchList) diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 2a233b9116..efac62c930 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -11,7 +11,7 @@ allow_dense = TRUE delivery_icon = null can_weld_shut = FALSE - armor = list(MELEE = 30, BULLET = 50, LASER = 50, ENERGY = 100, BOMB = 100, BIO = 0, RAD = 0, FIRE = 100, ACID = 80) + armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80) anchored = TRUE //So it cant slide around after landing anchorable = FALSE flags_1 = PREVENT_CONTENTS_EXPLOSION_1 @@ -167,7 +167,7 @@ . += decal return else if (GLOB.podstyles[style][POD_SHAPE] != POD_SHAPE_NORML) //If we're not a normal pod shape (aka, if we don't have fins), just add the door without masking - . += door + . += door else var/icon/masked_door = new(icon, door) //The door we want to apply var/icon/fin_masker = new(icon, "mask_[fin_mask]") //The fin shape we want to 'cut out' of the door From 152a57be7766c0e731ea1a15ae808f72cefccce2 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 14 Nov 2020 19:31:26 +0100 Subject: [PATCH 3/4] and another --- code/modules/admin/admin.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 10c79bb658..d4b2d03428 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -783,7 +783,8 @@ if(ispath(chosen, /turf)) T.ChangeTurf(chosen) else - var/obj/structure/closet/supplypod/centcompod/pod = new() + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/centcompod/pod = new(pick(get_area_turfs(pod_storage_area))) //Lets just have it in the pod bay for a moment instead of runtiming var/atom/A = new chosen(pod) A.flags_1 |= ADMIN_SPAWNED_1 new /obj/effect/pod_landingzone(T, pod) From 3e19557e8f7ecf274834fc492859ff984c395845 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sat, 14 Nov 2020 19:38:39 +0100 Subject: [PATCH 4/4] and more fixes. --- code/modules/admin/verbs/randomverbs.dm | 3 ++- code/modules/antagonists/traitor/equipment/contractor.dm | 4 ++-- code/modules/antagonists/traitor/syndicate_contract.dm | 7 ++++--- code/modules/events/stray_cargo.dm | 6 ++++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index d1f6d18e09..84702898ec 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1347,7 +1347,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits new /obj/effect/immovablerod(startT, endT,target) if(ADMIN_PUNISHMENT_SUPPLYPOD_QUICK) var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") as null|text - var/obj/structure/closet/supplypod/centcompod/pod = new() + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/centcompod/pod = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime pod.damage = 40 pod.explosionSize = list(0,0,0,2) pod.effectStun = TRUE diff --git a/code/modules/antagonists/traitor/equipment/contractor.dm b/code/modules/antagonists/traitor/equipment/contractor.dm index e5ff546b1b..28298f4983 100644 --- a/code/modules/antagonists/traitor/equipment/contractor.dm +++ b/code/modules/antagonists/traitor/equipment/contractor.dm @@ -187,8 +187,8 @@ partner_outfit.equip(partner) - var/obj/structure/closet/supplypod/arrival_pod = new() - + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/arrival_pod = new(pick(get_area_turfs(pod_storage_area))) arrival_pod.style = STYLE_SYNDICATE arrival_pod.explosionSize = list(0,0,0,1) arrival_pod.bluespace = TRUE diff --git a/code/modules/antagonists/traitor/syndicate_contract.dm b/code/modules/antagonists/traitor/syndicate_contract.dm index 5f998bd0dd..945823e95c 100644 --- a/code/modules/antagonists/traitor/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/syndicate_contract.dm @@ -59,7 +59,8 @@ // Launch the pod to collect our victim. /datum/syndicate_contract/proc/launch_extraction_pod(turf/empty_pod_turf) - var/obj/structure/closet/supplypod/extractionpod/empty_pod = new() + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/extractionpod/empty_pod = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime RegisterSignal(empty_pod, COMSIG_ATOM_ENTERED, .proc/enter_check) @@ -180,8 +181,8 @@ if(possible_drop_loc.len > 0) var/pod_rand_loc = rand(1, possible_drop_loc.len) - - var/obj/structure/closet/supplypod/return_pod = new() + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/return_pod = new(pick(get_area_turfs(pod_storage_area))) return_pod.bluespace = TRUE return_pod.explosionSize = list(0,0,0,0) return_pod.style = STYLE_SYNDICATE diff --git a/code/modules/events/stray_cargo.dm b/code/modules/events/stray_cargo.dm index aae39e28a4..bd4ded33dd 100644 --- a/code/modules/events/stray_cargo.dm +++ b/code/modules/events/stray_cargo.dm @@ -59,7 +59,8 @@ ///Handles the creation of the pod, in case it needs to be modified beforehand /datum/round_event/stray_cargo/proc/make_pod() - var/obj/structure/closet/supplypod/S = new + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/S = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime return S ///Picks an area that wouldn't risk critical damage if hit by a pod explosion @@ -94,6 +95,7 @@ ///Apply the syndicate pod skin /datum/round_event/stray_cargo/syndicate/make_pod() - var/obj/structure/closet/supplypod/S = new + var/area/pod_storage_area = locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas + var/obj/structure/closet/supplypod/S = new(pick(get_area_turfs(pod_storage_area))) //Lets not runtime S.setStyle(STYLE_SYNDICATE) return S