forked from ss220-space/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admin: admins now can spawn cargo crates (ss220-space#6455)
* admin: admins now can spawn cargo crates * fix * move button to secrets
- Loading branch information
1 parent
89bd4d5
commit 18e64d3
Showing
6 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/datum/admins/proc/create_cargo_crate() | ||
|
||
if(!check_rights(R_SPAWN)) | ||
return | ||
|
||
var/path = tgui_input_list(usr, "Выберите тип для спавна", "Карго ящики", (typecacheof(/datum/supply_packs) + typecacheof(/datum/syndie_supply_packs))) | ||
if(!path || !ispath(path)) | ||
return | ||
var/datum/supply_order/order = (path in typecacheof(/datum/supply_packs))? new /datum/supply_packs : new /datum/syndie_supply_order | ||
order.ordernum = 0 | ||
order.object = new path | ||
order.orderedby = "ОШИБКА" | ||
order.orderedbyRank = "ОШИБКА" | ||
order.crates = 1 | ||
order.createObject(get_turf(usr)) | ||
|
||
log_and_message_admins("spawned cargo pack [order.object.name] at ([usr.x],[usr.y],[usr.z])") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters