Merge pull request #12488 from Ghommie/Ghommie-cit813
Porting Cargo small-order support, cargo goodies packs, beating vendors for loot/squish.
This commit is contained in:
@@ -413,8 +413,8 @@
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns TRUE if shocked, FALSE otherwise
|
||||
// The preceding comment was borrowed from the grille's shock script
|
||||
/obj/machinery/door/airlock/proc/shock(mob/user, prb)
|
||||
if(!hasPower()) // unpowered, no shock
|
||||
/obj/machinery/door/airlock/proc/shock(mob/living/user, prb)
|
||||
if(!istype(user) || !hasPower()) // unpowered, no shock
|
||||
return FALSE
|
||||
if(shockCooldown > world.time)
|
||||
return FALSE //Already shocked someone recently?
|
||||
|
||||
@@ -257,7 +257,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
. += "[src] is made of cold-resistant materials."
|
||||
if(resistance_flags & FIRE_PROOF)
|
||||
. += "[src] is made of fire-retardant materials."
|
||||
|
||||
|
||||
if(item_flags & (ITEM_CAN_BLOCK | ITEM_CAN_PARRY))
|
||||
var/datum/block_parry_data/data = return_block_parry_datum(block_parry_data)
|
||||
. += "[src] has the capacity to be used to block and/or parry. <a href='?src=[REF(data)];name=[name];block=[item_flags & ITEM_CAN_BLOCK];parry=[item_flags & ITEM_CAN_PARRY];render=1'>\[Show Stats\]</a>"
|
||||
@@ -635,6 +635,18 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/itempush = 1
|
||||
if(w_class < 4)
|
||||
itempush = 0 //too light to push anything
|
||||
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if (throwforce > 0)
|
||||
if (throwhitsound)
|
||||
playsound(hit_atom, throwhitsound, volume, TRUE, -1)
|
||||
else if(hitsound)
|
||||
playsound(hit_atom, hitsound, volume, TRUE, -1)
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/genhit.ogg',volume, TRUE, -1)
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1)
|
||||
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
|
||||
@@ -779,6 +779,9 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
/obj/item/stack/sheet/plastic/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/plastic/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/sheet/plastic/five
|
||||
amount = 5
|
||||
|
||||
|
||||
@@ -266,6 +266,9 @@
|
||||
/obj/item/stack/tile/carpet/blackred/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/blackred/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/blackred/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -275,6 +278,9 @@
|
||||
/obj/item/stack/tile/carpet/monochrome/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/monochrome/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/monochrome/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -284,6 +290,9 @@
|
||||
/obj/item/stack/tile/carpet/blue/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/blue/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/blue/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -293,6 +302,9 @@
|
||||
/obj/item/stack/tile/carpet/cyan/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/cyan/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/cyan/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -302,6 +314,9 @@
|
||||
/obj/item/stack/tile/carpet/green/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/green/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/green/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -311,6 +326,9 @@
|
||||
/obj/item/stack/tile/carpet/orange/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/orange/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/orange/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -320,6 +338,9 @@
|
||||
/obj/item/stack/tile/carpet/purple/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/purple/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/purple/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -329,6 +350,9 @@
|
||||
/obj/item/stack/tile/carpet/red/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/red/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/red/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -338,6 +362,9 @@
|
||||
/obj/item/stack/tile/carpet/royalblack/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblack/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblack/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -347,6 +374,9 @@
|
||||
/obj/item/stack/tile/carpet/royalblue/twenty
|
||||
amount = 20
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblue/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblue/fifty
|
||||
amount = 50
|
||||
|
||||
|
||||
@@ -138,6 +138,22 @@
|
||||
icon_type = "cigarette"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
|
||||
custom_price = PRICE_ALMOST_CHEAP
|
||||
var/spawn_coupon = TRUE
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack_self(mob/user)
|
||||
if(contents.len == 0 && spawn_coupon)
|
||||
to_chat(user, "<span class='notice'>You rip the back off \the [src] and get a coupon!</span>")
|
||||
var/obj/item/coupon/attached_coupon = new
|
||||
user.put_in_hands(attached_coupon)
|
||||
attached_coupon.generate()
|
||||
attached_coupon = null
|
||||
spawn_coupon = FALSE
|
||||
name = "discarded cigarette packet"
|
||||
desc = "An old cigarette packet with the back torn off, worth less than nothing now."
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 0
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -148,6 +164,8 @@
|
||||
/obj/item/storage/fancy/cigarettes/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to extract contents.</span>"
|
||||
if(spawn_coupon)
|
||||
. += "<span class='notice'>There's a coupon on the back of the pack! You can tear it off once it's empty.</span>"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
@@ -308,6 +326,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
icon_type = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
spawn_coupon = FALSE
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -188,19 +188,52 @@
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/engineering
|
||||
name = "engineering medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the engineering department."
|
||||
req_access = list(ACCESS_CE)
|
||||
name = "engineering medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the engineering department."
|
||||
req_access = list(ACCESS_CE)
|
||||
|
||||
/obj/item/storage/lockbox/medal/engineering/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/engineer(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/engineer(src)
|
||||
|
||||
/obj/item/storage/lockbox/medal/medical
|
||||
name = "medical medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the medical department."
|
||||
req_access = list(ACCESS_CMO)
|
||||
name = "medical medal box"
|
||||
desc = "A locked box used to store medals to be given to the members of the medical department."
|
||||
req_access = list(ACCESS_CMO)
|
||||
|
||||
/obj/item/storage/lockbox/medal/medical/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/ribbon/medical_doctor(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/ribbon/medical_doctor(src)
|
||||
|
||||
/obj/item/storage/lockbox/order
|
||||
name = "order lockbox"
|
||||
desc = "A box used to secure small cargo orders from being looted by those who didn't order it. Yeah, cargo tech, that means you."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secure"
|
||||
item_state = "sec-case"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/datum/bank_account/buyer_account
|
||||
var/privacy_lock = TRUE
|
||||
|
||||
/obj/item/storage/lockbox/order/Initialize(datum/bank_account/_buyer_account)
|
||||
. = ..()
|
||||
buyer_account = _buyer_account
|
||||
|
||||
/obj/item/storage/lockbox/order/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
var/obj/item/card/id/id_card = W
|
||||
if(iscarbon(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
if(id_card.registered_account != buyer_account)
|
||||
to_chat(user, "<span class='notice'>Bank account does not match with buyer!</span")
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, !privacy_lock)
|
||||
privacy_lock = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
|
||||
user.visible_message("<span class='notice'>[user] [privacy_lock ? "" : "un"]locks [src]'s privacy lock.</span>",
|
||||
"<span class='notice'>You [privacy_lock ? "" : "un"]lock [src]'s privacy lock.</span>")
|
||||
|
||||
@@ -6,8 +6,16 @@
|
||||
max_integrity = 250
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
secure = TRUE
|
||||
var/melee_min_damage = 20
|
||||
|
||||
/obj/structure/closet/secure_closet/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee" && damage_amount < 20)
|
||||
if(damage_flag == "melee" && damage_amount < melee_min_damage)
|
||||
return 0
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
// Exists to work around the minimum 700 cr price for goodies / small items
|
||||
/obj/structure/closet/secure_closet/goodies
|
||||
icon_state = "goodies"
|
||||
desc = "A sturdier card-locked storage unit used for bulky shipments."
|
||||
max_integrity = 500 // Same as crates.
|
||||
melee_min_damage = 25 // Idem.
|
||||
|
||||
Reference in New Issue
Block a user