mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] Cleanup up all instances of using var/ definitions in proc parameters. (#240)
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728) * var/list cleanup * The rest of the owl * plushvar bad * Can't follow my own advice. * Cleanup up all instances of using var/ definitions in proc parameters. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -187,7 +187,7 @@ Behavior that's still missing from this component that original food items had t
|
||||
return TRUE
|
||||
|
||||
///Check foodtypes to see if we should send a moodlet
|
||||
/datum/component/edible/proc/checkLiked(var/fraction, mob/M)
|
||||
/datum/component/edible/proc/checkLiked(fraction, mob/M)
|
||||
if(last_check_time + 50 > world.time)
|
||||
return FALSE
|
||||
if(!ishuman(M))
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
user.put_in_active_hand(I)
|
||||
|
||||
/// Proc specifically for inserting items, returns the amount of materials entered.
|
||||
/datum/component/material_container/proc/insert_item(obj/item/I, var/multiplier = 1, stack_amt)
|
||||
/datum/component/material_container/proc/insert_item(obj/item/I, multiplier = 1, stack_amt)
|
||||
if(QDELETED(I))
|
||||
return FALSE
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return primary_mat
|
||||
|
||||
/// For inserting an amount of material
|
||||
/datum/component/material_container/proc/insert_amount_mat(amt, var/datum/material/mat)
|
||||
/datum/component/material_container/proc/insert_amount_mat(amt, datum/material/mat)
|
||||
if(!istype(mat))
|
||||
mat = SSmaterials.GetMaterialRef(mat)
|
||||
if(amt > 0 && has_space(amt))
|
||||
@@ -143,7 +143,7 @@
|
||||
return FALSE
|
||||
|
||||
/// Uses an amount of a specific material, effectively removing it.
|
||||
/datum/component/material_container/proc/use_amount_mat(amt, var/datum/material/mat)
|
||||
/datum/component/material_container/proc/use_amount_mat(amt, datum/material/mat)
|
||||
if(!istype(mat))
|
||||
mat = SSmaterials.GetMaterialRef(mat)
|
||||
var/amount = materials[mat]
|
||||
@@ -155,7 +155,7 @@
|
||||
return FALSE
|
||||
|
||||
/// Proc for transfering materials to another container.
|
||||
/datum/component/material_container/proc/transer_amt_to(var/datum/component/material_container/T, amt, var/datum/material/mat)
|
||||
/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, datum/material/mat)
|
||||
if(!istype(mat))
|
||||
mat = SSmaterials.GetMaterialRef(mat)
|
||||
if((amt==0)||(!T)||(!mat))
|
||||
@@ -207,7 +207,7 @@
|
||||
return total_amount_save - total_amount
|
||||
|
||||
/// For spawning mineral sheets at a specific location. Used by machines to output sheets.
|
||||
/datum/component/material_container/proc/retrieve_sheets(sheet_amt, var/datum/material/M, target = null)
|
||||
/datum/component/material_container/proc/retrieve_sheets(sheet_amt, datum/material/M, target = null)
|
||||
if(!M.sheet_type)
|
||||
return 0 //Add greyscale sheet handling here later
|
||||
if(sheet_amt <= 0)
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
|
||||
/// Returns TRUE if you have enough of the specified material.
|
||||
/datum/component/material_container/proc/has_enough_of_material(var/datum/material/req_mat, amount, multiplier=1)
|
||||
/datum/component/material_container/proc/has_enough_of_material(datum/material/req_mat, amount, multiplier=1)
|
||||
if(!materials[req_mat]) //Do we have the resource?
|
||||
return FALSE //Can't afford it
|
||||
var/amount_required = amount * multiplier
|
||||
@@ -314,7 +314,7 @@
|
||||
return material_amount
|
||||
|
||||
/// Returns the amount of a specific material in this container.
|
||||
/datum/component/material_container/proc/get_material_amount(var/datum/material/mat)
|
||||
/datum/component/material_container/proc/get_material_amount(datum/material/mat)
|
||||
if(!istype(mat))
|
||||
mat = SSmaterials.GetMaterialRef(mat)
|
||||
return(materials[mat])
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
RegisterSignal(parent, COMSIG_OBJ_ATTEMPT_CHARGE, .proc/attempt_charge)
|
||||
RegisterSignal(parent, COMSIG_OBJ_ATTEMPT_CHARGE_CHANGE, .proc/change_cost)
|
||||
|
||||
/datum/component/payment/proc/attempt_charge(datum/source, atom/movable/target, var/extra_fees = 0)
|
||||
/datum/component/payment/proc/attempt_charge(datum/source, atom/movable/target, extra_fees = 0)
|
||||
if(!cost) //In case a free variant of anything is made it'll skip charging anyone.
|
||||
return
|
||||
if(!ismob(target))
|
||||
@@ -65,7 +65,7 @@
|
||||
card.registered_account.bank_card_talk("[cost] credits deducted from your account.")
|
||||
playsound(src, 'sound/effects/cashregister.ogg', 20, TRUE)
|
||||
|
||||
/datum/component/payment/proc/change_cost(datum/source, var/new_cost)
|
||||
/datum/component/payment/proc/change_cost(datum/source, new_cost)
|
||||
if(!isnum(new_cost))
|
||||
CRASH("change_cost called with variable new_cost as not a number.")
|
||||
cost = new_cost
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/datum/component/pricetag/proc/Unwrapped()
|
||||
qdel(src) //Once it leaves it's wrapped container, the object in question should lose it's pricetag component.
|
||||
|
||||
/datum/component/pricetag/proc/split_profit(var/item_value)
|
||||
/datum/component/pricetag/proc/split_profit(item_value)
|
||||
var/price = item_value
|
||||
if(price)
|
||||
var/adjusted_value = price*(profit_ratio/100)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
addtimer(CALLBACK(src, .proc/burn_parent, fakefire, user), min(amount * 0.35 SECONDS, 20 SECONDS))
|
||||
UnregisterFromParent()
|
||||
|
||||
/datum/component/thermite/proc/burn_parent(var/datum/fakefire, mob/user)
|
||||
/datum/component/thermite/proc/burn_parent(datum/fakefire, mob/user)
|
||||
var/turf/master = parent
|
||||
if(!QDELETED(fakefire))
|
||||
qdel(fakefire)
|
||||
|
||||
Reference in New Issue
Block a user