Baystation12 merchant port (#3155)

Port of the merchant mechanics from baystation12.
All of the trader, prices and most essential system are done, as well the job datum and the like. Mapping the shuttle, the base and a new dock will be done in a later pr.
Also adds phazon construction and several other items used in this pr.
The chance of the merchant slow being open at round start can be changed via the config, it is 20% by default.
This commit is contained in:
Alberyk
2017-08-04 15:36:04 -03:00
committed by Erki
parent 0f072e15e9
commit b4fa4a8b3a
82 changed files with 4539 additions and 146 deletions
+4
View File
@@ -41,6 +41,10 @@
latejoin_cyborg += loc
delete_me = 1
return
if("JoinLateMerchant")
latejoin_merchant += loc
delete_me = 1
return
if("prisonwarp")
prisonwarp += loc
delete_me = 1
@@ -223,6 +223,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-gene"
/obj/item/device/pda/merchant
icon_state = "pda-chef"
hidden = 1
// Special AI/pAI PDAs that cannot explode.
/obj/item/device/pda/ai
@@ -0,0 +1,69 @@
/obj/item/device/dociler
name = "dociler"
desc = "A complex single use recharging injector that spreads a complex neurological serum that makes animals docile and friendly. Somewhat."
w_class = 3
origin_tech = list(TECH_BIO = 5, TECH_MATERIAL = 2)
icon_state = "animal_tagger1"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi'
)
item_state = "gun"
force = 0
var/loaded = 1
var/mode = "completely"
/obj/item/device/dociler/examine(var/mob/user)
. = ..(user)
user << "<span class='notice'>It is currently set to [mode] docile mode.</span>"
/obj/item/device/dociler/attack_self(var/mob/user)
if(mode == "somewhat")
mode = "completely"
else
mode = "somewhat"
user << "You set \the [src] to [mode] docile mode."
/obj/item/device/dociler/afterattack(var/mob/living/L, var/mob/user, proximity)
if(!proximity) return
if(!istype(L, /mob/living/simple_animal))
user << "<span class='warning'>\The [src] has no effect on \the [L].</span>"
return
if(!loaded)
user << "<span class='warning'>\The [src] isn't loaded!</span>"
return
user.visible_message("\The [user] thrusts \the [src] deep into \the [L]'s head, injecting something!")
if(mode == "somewhat")
L.faction = user.faction
else
L.faction = null
if(istype(L,/mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = L
if(!H.tameable)
user << "<span class='warning'>\The [src] has no effect on \the [L].</span>"
return
else
H.LoseTarget()
H.attack_same = 0
H.friends += user
L.desc += "<br><span class='notice'>It looks especially docile.</span>"
var/name = input(user, "Would you like to rename \the [L]?", "Dociler", L.name) as text
if(length(name))
L.real_name = name
L.name = name
loaded = 0
icon_state = "animal_tagger0"
addtimer(CALLBACK(src, .proc/do_recharge), 5 MINUTES)
/obj/item/device/dociler/proc/do_recharge()
loaded = 1
icon_state = "animal_tagger1"
src.visible_message("\The [src] beeps, refilling itself.")
@@ -372,3 +372,23 @@ REAGENT SCANNER
if (T.cores > 1)
user.show_message("Anomalious slime core amount detected")
user.show_message("Growth progress: [T.amount_grown]/10")
/obj/item/device/price_scanner
name = "price scanner"
desc = "Using an up-to-date database of various costs and prices, this device estimates the market price of an item up to 0.001% accuracy."
icon_state = "price_scanner"
slot_flags = SLOT_BELT
w_class = 2
throwforce = 0
throw_speed = 3
throw_range = 3
matter = list(DEFAULT_WALL_MATERIAL = 25, "glass" = 25)
/obj/item/device/price_scanner/afterattack(atom/movable/target, mob/user as mob, proximity)
if(!proximity)
return
var/value = get_value(target)
user.visible_message("\The [user] scans \the [target] with \the [src]")
user.show_message("Price estimation of \the [target]: [value ? value : "N/A"] Credits")
@@ -312,10 +312,17 @@ var/const/NO_EMAG_ACT = -50
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
/obj/item/weapon/card/id/captains_spare/New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/merchant
name = "merchant pass"
icon_state = "centcom"
desc = "An identification card issued to NanoTrasen sanctioned merchants, indicating their right to sell and buy goods."
access = list(access_merchant)
/obj/item/weapon/card/id/synthetic
name = "\improper Synthetic ID"
desc = "Access module for NanoTrasen Synthetics"
@@ -12,77 +12,93 @@
/obj/item/weapon/circuitboard/mecha/ripley
origin_tech = list(TECH_DATA = 3)
origin_tech = list(TECH_DATA = 3)
/obj/item/weapon/circuitboard/mecha/ripley/peripherals
name = T_BOARD_MECHA("Ripley peripherals control")
icon_state = "mcontroller"
name = T_BOARD_MECHA("Ripley peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/ripley/main
name = T_BOARD_MECHA("Ripley central control")
icon_state = "mainboard"
name = T_BOARD_MECHA("Ripley central control")
icon_state = "mainboard"
/obj/item/weapon/circuitboard/mecha/gygax
origin_tech = list(TECH_DATA = 4)
origin_tech = list(TECH_DATA = 4)
/obj/item/weapon/circuitboard/mecha/gygax/peripherals
name = T_BOARD_MECHA("Gygax peripherals control")
icon_state = "mcontroller"
name = T_BOARD_MECHA("Gygax peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/gygax/targeting
name = T_BOARD_MECHA("Gygax weapon control and targeting")
icon_state = "mcontroller"
origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4)
name = T_BOARD_MECHA("Gygax weapon control and targeting")
icon_state = "mcontroller"
origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4)
/obj/item/weapon/circuitboard/mecha/gygax/main
name = T_BOARD_MECHA("Gygax central control")
icon_state = "mainboard"
name = T_BOARD_MECHA("Gygax central control")
icon_state = "mainboard"
/obj/item/weapon/circuitboard/mecha/durand
origin_tech = list(TECH_DATA = 4)
origin_tech = list(TECH_DATA = 4)
/obj/item/weapon/circuitboard/mecha/durand/peripherals
name = T_BOARD_MECHA("Durand peripherals control")
icon_state = "mcontroller"
name = T_BOARD_MECHA("Durand peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/durand/targeting
name = T_BOARD_MECHA("Durand weapon control and targeting")
icon_state = "mcontroller"
origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4)
name = T_BOARD_MECHA("Durand weapon control and targeting")
icon_state = "mcontroller"
origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 4)
/obj/item/weapon/circuitboard/mecha/durand/main
name = T_BOARD_MECHA("Durand central control")
icon_state = "mainboard"
name = T_BOARD_MECHA("Durand central control")
icon_state = "mainboard"
/obj/item/weapon/circuitboard/mecha/honker
origin_tech = list(TECH_DATA = 4)
/obj/item/weapon/circuitboard/mecha/honker/peripherals
name = T_BOARD_MECHA("H.O.N.K peripherals control")
icon_state = "mcontroller"
name = T_BOARD_MECHA("H.O.N.K peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/honker/targeting
name = T_BOARD_MECHA("H.O.N.K weapon control and targeting")
icon_state = "mcontroller"
name = T_BOARD_MECHA("H.O.N.K weapon control and targeting")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/honker/main
name = T_BOARD_MECHA("H.O.N.K central control")
icon_state = "mainboard"
name = T_BOARD_MECHA("H.O.N.K central control")
icon_state = "mainboard"
/obj/item/weapon/circuitboard/mecha/odysseus
origin_tech = list(TECH_DATA = 3)
origin_tech = list(TECH_DATA = 3)
/obj/item/weapon/circuitboard/mecha/odysseus/peripherals
name = T_BOARD_MECHA("Odysseus peripherals control")
icon_state = "mcontroller"
name = T_BOARD_MECHA("Odysseus peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/odysseus/main
name = T_BOARD_MECHA("Odysseus central control")
icon_state = "mainboard"
name = T_BOARD_MECHA("Odysseus central control")
icon_state = "mainboard"
/obj/item/weapon/circuitboard/mecha/phazon
origin_tech = list(TECH_DATA = 5, TECH_BLUESPACE = 5)
/obj/item/weapon/circuitboard/mecha/phazon/peripherals
name = T_BOARD_MECHA("Phazon peripherals control")
icon_state = "mcontroller"
/obj/item/weapon/circuitboard/mecha/phazon/targeting
name = T_BOARD_MECHA("Phazon weapon control and targeting")
icon_state = "mcontroller"
origin_tech = list(TECH_DATA = 5, TECH_COMBAT = 6, TECH_BLUESPACE = 5)
/obj/item/weapon/circuitboard/mecha/phazon/main
name = T_BOARD_MECHA("Phazon central control")
icon_state = "mainboard"
//Undef the macro, shouldn't be needed anywhere else
#undef T_BOARD_MECHA
@@ -0,0 +1,7 @@
/obj/item/weapon/grenade/fake
name = "fragmentation grenade"
icon_state = "frag"
/obj/item/weapon/grenade/fake/prime()
active = 0
playsound(src.loc, get_sfx("explosion"), 50, 1, 30)
@@ -8,6 +8,7 @@
var/banglet = 0
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
var/list/newvars
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
@@ -21,6 +22,9 @@
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
if(newvars && length(newvars))
for(var/v in newvars)
x.vars[v] = newvars[v]
x.loc = T
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
@@ -43,3 +47,16 @@
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4)
/obj/item/weapon/grenade/spawnergrenade/singularity
name = "singularity grenade"
spawner_type = /obj/singularity
/obj/item/weapon/grenade/spawnergrenade/singularity/toy
spawner_type = /obj/item/toy/spinningtoy
/obj/item/weapon/grenade/spawnergrenade/fake_carp
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 5)
spawner_type = /mob/living/simple_animal/hostile/carp/holodeck
deliveryamt = 4
newvars = list("faction" = null, "melee_damage_lower" = 0, "melee_damage_upper" = 0, "environment_smash" = 0, "destroy_surroundings" = 0)
+26 -1
View File
@@ -86,6 +86,31 @@
else
..()
/obj/item/weapon/shield/buckler
name = "buckler"
desc = "A wooden buckler used to block sharp things from entering your body back in the day."
icon = 'icons/obj/weapons.dmi'
icon_state = "buckler"
slot_flags = SLOT_BACK
force = 8
throwforce = 8
base_block_chance = 60
throw_speed = 10
throw_range = 20
w_class = 4.0
origin_tech = list(TECH_MATERIAL = 1)
matter = list(DEFAULT_WALL_MATERIAL = 1000, "Wood" = 1000)
attack_verb = list("shoved", "bashed")
/obj/item/weapon/shield/buckler/handle_shield(mob/user)
. = ..()
if(.) playsound(user.loc, 'sound/weapons/Genhit.ogg', 50, 1)
/obj/item/weapon/shield/buckler/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
return 0
return base_block_chance
/*
* Energy Shield
*/
@@ -112,7 +137,7 @@
if(user.incapacitated())
return 0
if(.)
spark(user.loc, 5)
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
@@ -4,13 +4,6 @@
* Classic Baton
*/
/*
* Banhammer
*/
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]</b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
playsound(loc, 'sound/effects/adminhelp.ogg', 15)
/*
* Classic Baton
+2 -1
View File
@@ -761,7 +761,8 @@
/obj/item/weapon/gun/projectile/automatic/terminator = 0.5,
/obj/item/weapon/rig/military = 0.5,
/obj/item/weapon/rig/unathi/fancy = 0.5,
/obj/item/clothing/mask/ai = 0.5
/obj/item/clothing/mask/ai = 0.5,
/obj/item/weapon/anomaly_core = 0.5
)
/obj/random/junk
@@ -38,3 +38,7 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/head/soft(src)
/obj/structure/closet/secure_closet/merchant
name = "merchant locker"
req_access = list(access_merchant)