Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes carlarc's OP chocolate #6003

Merged
merged 19 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/game/machinery/bots/bots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
if(hasvar(W,"force") && hasvar(W,"damtype"))
switch(W.damtype)
if("fire")
src.health -= W.force * fire_dam_coeff
src.health -= W.force * W.demolition_mod * fire_dam_coeff
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
if("brute")
src.health -= W.force * brute_dam_coeff
src.health -= W.force * W.demolition_mod * brute_dam_coeff
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
..()
healthcheck()
else
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
else
switch(W.damtype)
if("fire")
src.health -= W.force * 0.75
src.health -= W.force * W.demolition_mod * 0.75
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
if("brute")
src.health -= W.force * 0.5
src.health -= W.force * W.demolition_mod * 0.5
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
if (src.health <= 0)
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
src.explode()
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
..()
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
var/attack_speed = 11 //+3, Adds up to 10. Added an extra 4 removed from /mob/proc/do_click()
///Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/attack_verb
/// A multiplier to an object's force when used against a stucture.
var/demolition_mod = 1

health = null

Expand Down
18 changes: 13 additions & 5 deletions code/game/objects/items/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@
qdel(src)
return FALSE

if(package)
to_chat(M, SPAN_WARNING("How do you expect to eat this with the package still on?"))
if(package && user.a_intent == INTENT_HARM)
return ..() // chunk box gaming

if(package && user.a_intent != INTENT_HARM)
if(user == M)
to_chat(M, SPAN_WARNING("How do you expect to eat this with the package still on?"))
else
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
to_chat(M, SPAN_WARNING("[M] tried to feed you a [src] with the package still on, what a silly goose!"))
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
return FALSE

if(istype(M, /mob/living/carbon))
Expand Down Expand Up @@ -3289,8 +3295,11 @@
name = "CHUNK box"
desc = "A bar of \"The <b>CHUNK</b>\" brand chocolate. <i>\"The densest chocolate permitted to exist according to federal law. We are legally required to ask you not to use this blunt object for anything other than nutrition.\"</i>"
icon_state = "chunk"
force = 15 //LEGAL LIMIT OF CHOCOLATE
hitsound = "swing_hit"
force = 15
throwforce = 10
attack_speed = 10
demolition_mod = 0.3
bitesize = 2
wrapper = /obj/item/trash/chunk

Expand All @@ -3304,8 +3313,7 @@
desc = "A 'crate', as the marketing called it, of \"The <b>HUNK</b>\" brand chocolate. An early version of the CHUNK box, the HUNK bar was hit by a class action lawsuit and forced to go into bankruptcy and get bought out by the Company when hundreds of customers had their teeth crack from simply attempting to eat the bar."
icon_state = "hunk"
w_class = SIZE_MEDIUM
hitsound = "swing_hit"
force = 35 //ILLEGAL LIMIT OF CHOCOLATE
force = 35
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
throwforce = 50
bitesize = 20
wrapper = /obj/item/trash/chunk/hunk
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/tools/surgery_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@
force = 10
sharp = IS_SHARP_ITEM_ACCURATE
edge = 1
demolition_mod = 0.1
w_class = SIZE_TINY
throwforce = 5
throwforce = 1
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
flags_item = CAN_DIG_SHRAPNEL
throw_speed = SPEED_VERY_FAST
throw_range = 5
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/barricade/barricade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
take_damage(dam * burn_flame_multiplier)

/obj/structure/barricade/proc/hit_barricade(obj/item/item)
take_damage(item.force * 0.5 * brute_multiplier)
take_damage(item.force * item.demolition_mod * 0.5 * brute_multiplier)

/obj/structure/barricade/proc/take_damage(damage)
for(var/obj/structure/barricade/barricade in get_step(src,dir)) //discourage double-stacking barricades by removing health from opposing barricade
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/structures/barricade/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
/obj/structure/barricade/snow/hit_barricade(obj/item/I)
switch(I.damtype)
if("fire")
take_damage( I.force * 0.6 )
take_damage( I.force * I.demolition_mod * 0.6 )
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
if("brute")
take_damage( I.force * 0.3 )
take_damage( I.force * I.demolition_mod * 0.3 )

return

Expand Down Expand Up @@ -106,6 +106,6 @@
/obj/structure/barricade/wooden/hit_barricade(obj/item/I)
switch(I.damtype)
if("fire")
take_damage( I.force * 1.5 )
take_damage( I.force * I.demolition_mod * 1.5 )
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
if("brute")
take_damage( I.force * 0.75 )
take_damage( I.force * I.demolition_mod * 0.75 )
4 changes: 2 additions & 2 deletions code/game/objects/structures/fence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@
else
switch(W.damtype)
if("fire")
health -= W.force
health -= W.force * W.demolition_mod
if("brute")
health -= W.force * 0.1
health -= (W.force * W.demolition_mod) * 0.1
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
healthcheck(1, 1, user, W)
..()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/lamarr_cage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


/obj/structure/lamarr/attackby(obj/item/W as obj, mob/user as mob)
src.health -= W.force
src.health -= W.force * W.demolition_mod
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
src.healthcheck()
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
..()
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/mirror.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 25, 1)
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
user.visible_message(SPAN_WARNING("[user] hits [src] with [I], but it's already broken!"), SPAN_WARNING("You hit [src] with [I], but it's already broken!"))
return
if(prob(I.force * 2))
if(prob((I.force * I.demolition_mod ) * 2))
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
user.visible_message(SPAN_WARNING("[user] smashes [src] with [I]!"), SPAN_WARNING("You smash [src] with [I]!"))
shatter()
else
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
to_chat(user, (state ? SPAN_NOTICE("You have pried the window into the frame.") : SPAN_NOTICE("You have pried the window out of the frame.")))
else
if(!not_damageable) //Impossible to destroy
health -= W.force
health -= W.force * W.demolition_mod
if(health <= 7 && !reinf && !static_frame && !not_deconstructable)
anchored = FALSE
update_nearby_icons()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_aliens/XenoStructures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

/obj/effect/alien/resin/attackby(obj/item/W, mob/user)
if(!(W.flags_item & NOBLUDGEON))
var/damage = W.force * RESIN_MELEE_DAMAGE_MULTIPLIER
var/damage = W.force * W.demolition_mod * RESIN_MELEE_DAMAGE_MULTIPLIER
health -= damage
if(istype(src, /obj/effect/alien/resin/sticky))
playsound(loc, "alien_resin_move", 25)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
else
to_chat(user, SPAN_WARNING("You cut \the [src] away with \the [attacking_item]."))

var/damage = attacking_item.force / 3
var/damage = (attacking_item.force * attacking_item.demolition_mod) / 3
playsound(loc, "alien_resin_break", 25)

if(iswelder(attacking_item))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
else if(status != LIGHT_BROKEN && status != LIGHT_EMPTY)


if(prob(1+W.force * 5))
if(prob(1+W.force * W.demolition_mod * 5))

to_chat(user, "You hit the light, and it smashes!")
for(var/mob/M as anything in viewers(src))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/vehicles/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
else if(W.force)
switch(W.damtype)
if("fire")
health -= W.force * fire_dam_coeff
health -= W.force * W.demolition_mod * fire_dam_coeff
if("brute")
health -= W.force * brute_dam_coeff
health -= W.force * W.demolition_mod * brute_dam_coeff
playsound(src.loc, "smash.ogg", 25, 1)
vero5123 marked this conversation as resolved.
Show resolved Hide resolved
user.visible_message(SPAN_DANGER("[user] hits [src] with [W]."),SPAN_DANGER("You hit [src] with [W]."))
healthcheck()
Expand Down
Loading