mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Ports the Shuttle Loan Event (#30138)
* Ports the Shuttle Loan event * Russians -> Soviets * Oops * Grammar * Better item name * Defines * Linters * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Debug logs * Use UIDs. Fixes bomb timers * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> * Static Lists --------- Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,9 @@
|
||||
/obj/machinery/the_singularitygen,
|
||||
/obj/effect/hierophant,
|
||||
/obj/item/warp_cube),
|
||||
"undelivered mail" = list(/obj/item/envelope))
|
||||
"undelivered mail" = list(/obj/item/envelope),
|
||||
"live ordnance" = list(/obj/machinery/syndicatebomb)
|
||||
)
|
||||
|
||||
// The current manifest of what's on the shuttle.
|
||||
var/datum/economy/cargo_shuttle_manifest/manifest = new
|
||||
@@ -146,6 +148,23 @@
|
||||
PC.update_icon()
|
||||
|
||||
SG.should_send_crate = FALSE
|
||||
if(SSshuttle.shuttle_loan_UID)
|
||||
var/datum/event/shuttle_loan/shuttle_loan = locateUID(SSshuttle.shuttle_loan_UID)
|
||||
if(!shuttle_loan.dispatched)
|
||||
return
|
||||
// let the situation spawn its items
|
||||
var/list/spawn_list = list()
|
||||
shuttle_loan.situation.spawn_items(spawn_list, emptyTurfs)
|
||||
var/false_positive = 0
|
||||
while(spawn_list.len && emptyTurfs.len)
|
||||
var/turf/spawn_turf = pick_n_take(emptyTurfs)
|
||||
if(spawn_turf.contents.len && false_positive < 5)
|
||||
false_positive++
|
||||
continue
|
||||
var/spawn_type = pick_n_take(spawn_list)
|
||||
new spawn_type(spawn_turf)
|
||||
// Clear the event so it doesn't cause a problem again
|
||||
SSshuttle.shuttle_loan_UID = null
|
||||
|
||||
/obj/docking_port/mobile/supply/proc/scan_cargo()
|
||||
manifest = new
|
||||
|
||||
Reference in New Issue
Block a user