mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Rental bikes on Point Verdant (#18466)
* thgncmdc * a * 457ythrbg * a * agony * y * tests rerun please * tests rerun please * a * tests rerun please * tests rerun please * fuck * kill me * tests rerun please * cc * aaaaaaaaaaaaaaaaaaaa * augh * fewsgsbh,vgjvtderzj5tderszhrfdbghrdenyz * a34yhsrezdtjtryfxkjrstjrtysajh5taeh5r34e5R4EW3 4 tygw4e T342W 4w * Update code/game/machinery/vending_types.dm Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Signed-off-by: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> * review --------- Signed-off-by: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Co-authored-by: DreamySkrell <> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
@@ -145,6 +145,7 @@
|
||||
src.ads_list += text2list(src.product_ads, ";")
|
||||
|
||||
add_screen_overlay()
|
||||
build_products()
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
@@ -168,6 +169,15 @@
|
||||
add_overlay(screen_overlays["[icon_state]-[deny ? "deny" : "screen"]"])
|
||||
reset_light()
|
||||
|
||||
/**
|
||||
* Build src.products
|
||||
*
|
||||
* To be overriden if building the products list is dynamic at runtime or needs any complex logic
|
||||
*/
|
||||
/obj/machinery/vending/proc/build_products()
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
return
|
||||
|
||||
/**
|
||||
* Build src.product_records from the products lists
|
||||
*
|
||||
@@ -719,6 +729,7 @@
|
||||
|
||||
var/vending_usr_dir = get_dir(src, user)
|
||||
var/obj/vended = new R.product_path(get_step(src, vending_usr_dir))
|
||||
vended_product_post(vended)
|
||||
if(Adjacent(user))
|
||||
user.put_in_hands(vended)
|
||||
src.status_message = ""
|
||||
@@ -735,6 +746,12 @@
|
||||
if(1)
|
||||
use_power_oneoff(RC.reagents.set_temperature(heating_temperature))
|
||||
|
||||
/// To be overriden if vended out products need any post-processing, setting its vars.
|
||||
/// Called by `vend_product`.
|
||||
/// `vended` is the item that is being vended out.
|
||||
/obj/machinery/vending/proc/vended_product_post(var/obj/vended)
|
||||
return
|
||||
|
||||
/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user)
|
||||
|
||||
to_chat(user, "<span class='notice'>You insert \the [R.product_name] in the product receptor.</span>")
|
||||
|
||||
@@ -1638,3 +1638,50 @@
|
||||
/obj/item/reagent_containers/food/drinks/bottle/wine = 50,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/champagne = 100
|
||||
)
|
||||
|
||||
/obj/machinery/vending/rental_bikes
|
||||
name = "\improper Rental Bikes self-service vendor"
|
||||
desc = "Rent-a-bike, for a day!"
|
||||
icon_state = "rent-a-bike"
|
||||
icon_vend = "rent-a-bike-vend"
|
||||
vend_id = "rent-a-bike"
|
||||
products = list(
|
||||
/obj/item/key/bike/moped = 0, // filled from the key data lists
|
||||
/obj/item/key/bike/sport = 0,
|
||||
)
|
||||
prices = list(
|
||||
/obj/item/key/bike/moped = 50,
|
||||
/obj/item/key/bike/sport = 200,
|
||||
)
|
||||
restock_items = FALSE
|
||||
random_itemcount = FALSE
|
||||
light_color = COLOR_BABY_BLUE
|
||||
|
||||
/// List of strings.
|
||||
/// Vended out keys will be filled with these key data (== bike reg plates) strings.
|
||||
/// Also based on this list is filled the products assoc list.
|
||||
var/list/key_data_mopeds = list()
|
||||
|
||||
/// Same as the list for mopeds, except for sports bikes.
|
||||
var/list/key_data_sports = list()
|
||||
|
||||
/obj/machinery/vending/rental_bikes/build_products()
|
||||
products[/obj/item/key/bike/moped] = length(key_data_mopeds)
|
||||
products[/obj/item/key/bike/sport] = length(key_data_sports)
|
||||
|
||||
/obj/machinery/vending/rental_bikes/vended_product_post(var/obj/vended)
|
||||
var/obj/item/key/key = vended
|
||||
if(!istype(key))
|
||||
return
|
||||
|
||||
// expires the next day
|
||||
var/rental_expiry = "[GLOB.game_year]-[time2text(world.realtime + 1 DAY, "MM-DD")] [worldtime2text()]"
|
||||
key.desc += " Property of Idris Incorporated. Rental expires on [rental_expiry]. Return fully charged."
|
||||
|
||||
if(key_data_mopeds && istype(key, /obj/item/key/bike/moped))
|
||||
key.key_data = key_data_mopeds[1]
|
||||
key_data_mopeds.Cut(1,2)
|
||||
else if(key_data_sports && istype(key, /obj/item/key/bike/sport))
|
||||
key.key_data = key_data_sports[1]
|
||||
key_data_sports.Cut(1,2)
|
||||
|
||||
|
||||
@@ -29,15 +29,16 @@
|
||||
if(_program == null)
|
||||
qdel(src) //Delete itself if no program is set
|
||||
return
|
||||
var/datum/computer_file/program/PRG = GLOB.ntnet_global.find_ntnet_file_by_name(_program)
|
||||
if(!PRG)
|
||||
var/datum/computer_file/program/program = GLOB.ntnet_global.find_ntnet_file_by_name(_program)
|
||||
if(!program)
|
||||
qdel(src) //Delete itself it no matching program is found
|
||||
return
|
||||
max_capacity = PRG.size // Set the capacity of the backup disk to the capacity of the program
|
||||
store_file(PRG)
|
||||
var/datum/computer_file/program/program_cloned = program.clone(FALSE, "Compless")
|
||||
max_capacity = program_cloned.size // Set the capacity of the backup disk to the capacity of the program
|
||||
store_file(program_cloned)
|
||||
read_only = TRUE
|
||||
desc = "A read-only backup storage crystal containing a backup of the following software: [PRG.filedesc]"
|
||||
name = "[PRG.filedesc] backup crystal"
|
||||
desc = "A read-only backup storage crystal containing a backup of the following software: [program_cloned.filedesc]"
|
||||
name = "[program_cloned.filedesc] backup crystal"
|
||||
|
||||
/obj/structure/closet/crate/software_backup
|
||||
desc = "A crate containing a backup of all the NT Software available."
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
author: DreamySkrell
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Adds rental bike self-service vendor and rental bike mechanics."
|
||||
- rscadd: "Maps in bikes, keys, and rental bikes, onto Point Verdant."
|
||||
- bugfix: "Fixes hard drive stored files hard dell error."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 68 KiB |
@@ -2377,6 +2377,18 @@
|
||||
},
|
||||
/turf/simulated/floor/exoplanet/konyang,
|
||||
/area/point_verdant/outdoors)
|
||||
"hn" = (
|
||||
/obj/effect/decal/road_marking{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/decal/road_marking{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/decal/curb{
|
||||
dir = 1
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/interior/tunnels)
|
||||
"ho" = (
|
||||
/turf/unsimulated/wall/konyang,
|
||||
/area/point_verdant/interior/offices/kaf)
|
||||
@@ -2943,6 +2955,26 @@
|
||||
"iY" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/structure/table/reinforced/wood,
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = 2;
|
||||
pixel_y = 2;
|
||||
key_data = "S58-2165"
|
||||
},
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = -5;
|
||||
key_data = "S17-3906"
|
||||
},
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = -9;
|
||||
pixel_y = 5;
|
||||
key_data = "2KA-N3DA"
|
||||
},
|
||||
/obj/item/key/bike/moped{
|
||||
pixel_x = 8;
|
||||
pixel_y = -1;
|
||||
key_data = "T3T-5U01"
|
||||
},
|
||||
/turf/simulated/floor/lino/diamond,
|
||||
/area/point_verdant/interior/decrepit)
|
||||
"ja" = (
|
||||
@@ -4688,6 +4720,16 @@
|
||||
/obj/structure/curtain/open/shower,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/point_verdant/interior/offices/kaf)
|
||||
"ok" = (
|
||||
/obj/effect/decal/road_marking,
|
||||
/obj/effect/decal/curb,
|
||||
/obj/vehicle/bike/motor/police_konyang{
|
||||
dir = 4;
|
||||
spawns_with_key = 0;
|
||||
registration_plate = "P99-7257"
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/interior/tunnels)
|
||||
"om" = (
|
||||
/obj/structure/ledge/quarter,
|
||||
/obj/structure/trash_pile,
|
||||
@@ -5310,6 +5352,9 @@
|
||||
/obj/effect/decal/road_marking{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/decal/road_marking{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/decal/curb{
|
||||
dir = 5
|
||||
},
|
||||
@@ -5454,6 +5499,15 @@
|
||||
"qI" = (
|
||||
/obj/effect/decal/cleanable/dirt,
|
||||
/obj/structure/table/wood,
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = -4;
|
||||
key_data = "S71-3614"
|
||||
},
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = 8;
|
||||
key_data = "S62-4394";
|
||||
pixel_y = -3
|
||||
},
|
||||
/turf/simulated/floor/lino,
|
||||
/area/point_verdant/interior/streetvendor)
|
||||
"qJ" = (
|
||||
@@ -8344,6 +8398,9 @@
|
||||
/obj/random/dirt_75,
|
||||
/obj/random/dirt_75,
|
||||
/obj/random/dirt_75,
|
||||
/obj/vehicle/bike/motor/moped/police_konyang{
|
||||
dir = 1
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/interior/police)
|
||||
"zU" = (
|
||||
@@ -9197,6 +9254,11 @@
|
||||
/obj/effect/floor_decal/corner/mauve{
|
||||
dir = 6
|
||||
},
|
||||
/obj/item/key/bike/moped{
|
||||
pixel_x = 5;
|
||||
pixel_y = -7;
|
||||
key_data = "M22-2289"
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/point_verdant/interior/maint_janitorial)
|
||||
"CE" = (
|
||||
@@ -10459,6 +10521,9 @@
|
||||
/area/point_verdant/interior/maint_janitorial)
|
||||
"Gq" = (
|
||||
/obj/effect/decal/road_marking,
|
||||
/obj/effect/decal/road_marking{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/decal/curb{
|
||||
dir = 6
|
||||
},
|
||||
@@ -10904,6 +10969,16 @@
|
||||
},
|
||||
/turf/simulated/floor/exoplanet/konyang,
|
||||
/area/point_verdant/interior/tunnels)
|
||||
"Hp" = (
|
||||
/obj/effect/decal/road_marking,
|
||||
/obj/effect/decal/curb,
|
||||
/obj/vehicle/bike/motor/brown{
|
||||
dir = 4;
|
||||
spawns_with_key = 0;
|
||||
registration_plate = "S84-7683"
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/interior/tunnels)
|
||||
"Hq" = (
|
||||
/obj/structure/flora/rock/konyang/small,
|
||||
/turf/simulated/floor/sidewalk/flat,
|
||||
@@ -11219,7 +11294,9 @@
|
||||
/area/point_verdant/interior/spaceport)
|
||||
"Im" = (
|
||||
/obj/vehicle/bike/motor/moped{
|
||||
dir = 4
|
||||
dir = 4;
|
||||
registration_plate = "M22-2289";
|
||||
spawns_with_key = 0
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/interior)
|
||||
@@ -11808,6 +11885,14 @@
|
||||
/obj/structure/ledge/quarter,
|
||||
/turf/simulated/floor/exoplanet/water/shallow/konyang/no_smooth,
|
||||
/area/point_verdant/interior/offices/kaf)
|
||||
"Kf" = (
|
||||
/obj/effect/decal/curb,
|
||||
/obj/structure/table/reinforced/steel,
|
||||
/obj/machinery/cell_charger{
|
||||
pixel_y = 3
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/point_verdant/interior/offices/kaf)
|
||||
"Kg" = (
|
||||
/obj/random/junk,
|
||||
/obj/random/dirt_75,
|
||||
@@ -13996,10 +14081,15 @@
|
||||
pixel_y = 4;
|
||||
req_access = list(218)
|
||||
},
|
||||
/obj/machinery/cell_charger{
|
||||
pixel_y = 3
|
||||
},
|
||||
/obj/structure/table/reinforced/steel,
|
||||
/obj/item/key/bike/sport{
|
||||
pixel_x = -4;
|
||||
key_data = "S84-7683"
|
||||
},
|
||||
/obj/item/key/bike/police{
|
||||
pixel_x = 4;
|
||||
key_data = "P99-7257"
|
||||
},
|
||||
/turf/simulated/floor/sidewalk/dark,
|
||||
/area/point_verdant/interior/offices/kaf)
|
||||
"Qv" = (
|
||||
@@ -21545,7 +21635,7 @@ ho
|
||||
PD
|
||||
PD
|
||||
KU
|
||||
gI
|
||||
Kf
|
||||
VQ
|
||||
gJ
|
||||
FW
|
||||
@@ -23852,7 +23942,7 @@ rf
|
||||
AV
|
||||
Th
|
||||
WO
|
||||
fB
|
||||
ok
|
||||
DQ
|
||||
hJ
|
||||
hJ
|
||||
@@ -24109,11 +24199,11 @@ rf
|
||||
AV
|
||||
Th
|
||||
WO
|
||||
VX
|
||||
fB
|
||||
DQ
|
||||
hJ
|
||||
hJ
|
||||
Ks
|
||||
hn
|
||||
WO
|
||||
ho
|
||||
BR
|
||||
@@ -24366,7 +24456,7 @@ rf
|
||||
AV
|
||||
Th
|
||||
WO
|
||||
VX
|
||||
Hp
|
||||
DQ
|
||||
DQ
|
||||
DQ
|
||||
@@ -24627,7 +24717,7 @@ fB
|
||||
WX
|
||||
DQ
|
||||
fi
|
||||
Ks
|
||||
hn
|
||||
WO
|
||||
WO
|
||||
WO
|
||||
@@ -29538,7 +29628,7 @@ wr
|
||||
mO
|
||||
mO
|
||||
Yn
|
||||
fh
|
||||
xn
|
||||
kg
|
||||
wD
|
||||
wD
|
||||
@@ -29795,7 +29885,7 @@ UW
|
||||
UW
|
||||
UW
|
||||
Yn
|
||||
xn
|
||||
fh
|
||||
wD
|
||||
wD
|
||||
kg
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -912,6 +912,12 @@
|
||||
/obj/item/reagent_containers/glass/bucket,
|
||||
/turf/simulated/floor/wood,
|
||||
/area/point_verdant/interior/laundromat)
|
||||
"gj" = (
|
||||
/obj/structure/automobile/random{
|
||||
dir = 8
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/outdoors)
|
||||
"gn" = (
|
||||
/obj/effect/decal/curb{
|
||||
dir = 1
|
||||
@@ -1802,6 +1808,10 @@
|
||||
/area/point_verdant/interior/police)
|
||||
"oe" = (
|
||||
/obj/effect/decal/road_marking,
|
||||
/obj/vehicle/bike/motor/moped/red{
|
||||
dir = 8;
|
||||
spawns_with_key = 0
|
||||
},
|
||||
/turf/simulated/floor/asphalt,
|
||||
/area/point_verdant/outdoors)
|
||||
"of" = (
|
||||
@@ -6637,7 +6647,15 @@
|
||||
/area/point_verdant/outdoors)
|
||||
"ZG" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/item/towel,
|
||||
/obj/item/towel{
|
||||
pixel_x = -3;
|
||||
pixel_y = 4
|
||||
},
|
||||
/obj/item/key/bike/moped{
|
||||
pixel_x = 6;
|
||||
pixel_y = -11;
|
||||
key_data = "M99-7614"
|
||||
},
|
||||
/turf/simulated/floor/wood,
|
||||
/area/point_verdant/interior/restaurant)
|
||||
"ZH" = (
|
||||
@@ -21412,7 +21430,7 @@ pe
|
||||
hw
|
||||
hw
|
||||
UV
|
||||
DD
|
||||
gj
|
||||
DD
|
||||
AV
|
||||
rg
|
||||
|
||||
Reference in New Issue
Block a user