Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsMarmite committed May 9, 2024
2 parents 42c4b2a + 10e32fd commit 24c6e69
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 38 deletions.
2 changes: 1 addition & 1 deletion code/datums/components/debris.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
smoke_visuals.particles.position = list(position_offset, position_offset)
smoke_visuals.particles.velocity = list(x_component_smoke, y_component_smoke)

if(debris && !(P.damage_type == BURN))
if(debris && P.damage_type == BRUTE)
debris_visuals = new(parent, /particles/debris)
debris_visuals.particles.position = generator("circle", position_offset, position_offset)
debris_visuals.particles.velocity = list(x_component, y_component)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/spell_handler/vampire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
return

var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)

vampire.bloodusable -= calculate_blood_cost(vampire)
var/blood_cost = calculate_blood_cost(vampire)
vampire.subtract_usable_blood(blood_cost)

/datum/spell_handler/vampire/proc/calculate_blood_cost(datum/antagonist/vampire/vampire)
var/blood_cost_modifier = 1 + vampire.nullified / 100
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/effects/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
///typepath of the last location we're in, if it's different when moved then we need to update vis contents
var/last_attached_location_type
/// The main item we're attached to at the moment, particle holders hold particles for something
var/atom/parent
var/atom/movable/parent
/// The mob that is holding our item
var/mob/holding_parent

Expand All @@ -181,6 +181,7 @@
if(parent)
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
QDEL_NULL(particles)
parent.vis_contents -= src
return ..()

///signal called when parent is moved
Expand All @@ -192,6 +193,7 @@
///signal called when parent is deleted
/obj/effect/abstract/particle_holder/proc/on_qdel(atom/movable/attached, force)
SIGNAL_HANDLER
attached.vis_contents -= src
qdel(src)//our parent is gone and we need to be as well

///logic proc for particle holders, aka where they move.
Expand Down
9 changes: 0 additions & 9 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Toy Nuke
* Card Deck
* Therapy dolls
* Toddler doll
* Inflatable duck
* Foam armblade
* Mini Gibber
Expand Down Expand Up @@ -438,14 +437,6 @@
item_state = "egg3" // It's the green egg in items_left/righthand
item_color = "green"

/obj/item/toddler
icon_state = "toddler"
name = "toddler"
desc = "This baby looks almost real. Wait, did it just burp?"
force = 5
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_FLAG_BACK


//This should really be somewhere else but I don't know where. w/e

Expand Down
24 changes: 12 additions & 12 deletions code/game/objects/items/weapons/cash.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/obj/item/stack/spacecash
name = "1 Credit"
desc = "Money money money."
icon = 'icons/goonstation/objects/money.dmi'
icon_state = "cashgreen"
icon = 'icons/obj/money.dmi'
icon_state = "cash"
hitsound = "swing_hit"
force = 1
throwforce = 1
Expand Down Expand Up @@ -38,18 +38,18 @@

/obj/item/stack/spacecash/update_icon_state()
name = "[amount] Credit[amount > 1 ? "s" : ""]"
if(amount >= 1 && amount < 10)
icon_state = "cashgreen"
else if(amount >= 10 && amount < 50)
icon_state = "spacecash"
else if(amount >= 50 && amount < 500)
icon_state = "cashblue"
if(amount >= 1 && amount < 50)
icon_state = "cash"
else if(amount >= 50 && amount < 100)
icon_state = "cash2"
else if(amount >= 100 && amount < 500)
icon_state = "cash3"
else if(amount >= 500 && amount < 1000)
icon_state = "cashindi"
else if(amount >= 1000 && amount <= 10000)
icon_state = "cashpurp"
icon_state = "cash4"
else if(amount >= 1000 && amount < 10000)
icon_state = "cash5"
else
icon_state = "cashrbow"
icon_state = "cash6"

/obj/item/stack/spacecash/c5
amount = 5
Expand Down
18 changes: 17 additions & 1 deletion code/modules/antagonists/vampire/vamp_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
return
if(bloodusable >= 10) //burn through your blood to tank the light for a little while
to_chat(owner.current, "<span class='warning'>The starlight saps your strength!</span>")
bloodusable -= 10
subtract_usable_blood(10)
vamp_burn(10)
else //You're in trouble, get out of the sun NOW
to_chat(owner.current, "<span class='userdanger'>Your body is turning to ash, get out of the light now!</span>")
Expand Down Expand Up @@ -278,6 +278,13 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
REMOVE_TRAIT(owner.current, TRAIT_GOTTAGONOTSOFAST, VAMPIRE_TRAIT)
owner.current.alpha = 204 // 255 * 0.80

/**
* Handles unique drain ID checks and increases vampire's total and usable blood by blood_amount. Checks for ability upgrades.
*
* Arguments:
** C: victim [/mob/living/carbon] that is being drained form.
** blood_amount: amount of blood to add to vampire's usable and total pools.
*/
/datum/antagonist/vampire/proc/adjust_blood(mob/living/carbon/C, blood_amount = 0)
if(C)
var/unique_suck_id = C.UID()
Expand All @@ -293,6 +300,15 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
if(S.action)
S.action.UpdateButtons()

/**
* Safely subtract vampire's bloodusable. Clamped between 0 and bloodtotal.
*
* Arguments:
** blood_amount: amount of blood to subtract.
*/
/datum/antagonist/vampire/proc/subtract_usable_blood(blood_amount)
bloodusable = clamp(bloodusable - blood_amount, 0, bloodtotal)

/datum/antagonist/vampire/proc/vamp_burn(burn_chance)
if(prob(burn_chance) && owner.current.health >= 50)
switch(owner.current.health)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
handle_enthrall(user, target)
var/datum/spell_handler/vampire/V = custom_handler
var/blood_cost = V.calculate_blood_cost(vampire)
vampire.bloodusable -= blood_cost //we take the blood after enthralling, not before
vampire.subtract_usable_blood(blood_cost) //we take the blood after enthralling, not before
else
revert_cast(user)
to_chat(user, "<span class='warning'>You or your target moved.</span>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
var/datum/spell_handler/vampire/V = custom_handler
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
var/blood_cost = V.calculate_blood_cost(vampire)
vampire.bloodusable -= blood_cost
vampire.subtract_usable_blood(blood_cost)
start_turf = null
should_recharge_after_cast = FALSE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
var/datum/spell_handler/vampire/V = custom_handler
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
var/blood_cost = V.calculate_blood_cost(vampire)
vampire.bloodusable = clamp(vampire.bloodusable - blood_cost, 0, vampire.bloodusable)// Vampires get a coupon if they have less than the normal blood cost
vampire.subtract_usable_blood(blood_cost)// Vampires get a coupon if they have less than the normal blood cost

/proc/shadow_to_animation(turf/start_turf, turf/end_turf, mob/user)
var/x_difference = end_turf.x - start_turf.x
Expand Down
6 changes: 0 additions & 6 deletions code/modules/economy/merch_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@
cost = 500
category = MERCH_CAT_TOY

/datum/merch_item/baby
name = "Toddler"
desc = "This baby looks almost real. Wait, did it just burp?"
typepath = /obj/item/toddler
cost = 500
category = MERCH_CAT_TOY

/datum/merch_item/flag_slime
name = "Slime People Flag"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
light_color = LIGHT_COLOR_LAVA
projectiletype = /obj/item/projectile/temp/basilisk/magmawing
crusher_loot = /obj/item/crusher_trophy/blaster_tubes/magma_wing
crusher_drop_mod = 60
crusher_drop_mod = 100 //These things are extremely rare (1/133 per spawner). You shouldn't have to hope for another stroke of luck to get it's trophy after finding it

/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing
name = "icewing watcher"
Expand All @@ -110,7 +110,7 @@
projectiletype = /obj/item/projectile/temp/basilisk/icewing
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable
crusher_loot = /obj/item/crusher_trophy/watcher_wing/ice_wing
crusher_drop_mod = 30
crusher_drop_mod = 100 //These things are extremely rare (1/400 per spawner). You shouldn't have to hope for another stroke of luck to get it's trophy after finding it

/obj/item/projectile/temp/basilisk/magmawing
name = "scorching blast"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) //A throwback to the asteroid days
butcher_results = list(/obj/item/food/snacks/monstermeat/goliath= 2, /obj/item/stack/sheet/bone = 2)
crusher_loot = /obj/item/crusher_trophy/goliath_tentacle/ancient
crusher_drop_mod = 30
crusher_drop_mod = 100 //These things are rare (1/100 per spawner). You shouldn't have to hope for another stroke of luck to get it's trophy after finding it
wander = FALSE
var/list/cached_tentacle_turfs
var/turf/last_location
Expand Down
Binary file removed icons/goonstation/objects/money.dmi
Binary file not shown.
Binary file modified icons/obj/items.dmi
Binary file not shown.
Binary file added icons/obj/money.dmi
Binary file not shown.
Binary file modified icons/obj/stock_parts.dmi
Binary file not shown.

0 comments on commit 24c6e69

Please sign in to comment.