|
35 | 35 |
|
36 | 36 | var/list/dent_decals
|
37 | 37 |
|
| 38 | + //Monkestation edit start |
| 39 | + max_integrity = 300 |
| 40 | + damage_deflection = 22 // big chunk of solid metal |
| 41 | + uses_integrity = TRUE |
| 42 | + armor_type = /datum/armor/wall |
| 43 | + |
| 44 | +/datum/armor/wall |
| 45 | + melee = 60 |
| 46 | + bullet = 60 |
| 47 | + laser = 60 |
| 48 | + energy = 0 |
| 49 | + bomb = 0 |
| 50 | + bio = 0 |
| 51 | + acid = 50 |
| 52 | + wound = 0 |
| 53 | +//Monkestation edit end |
| 54 | + |
| 55 | + |
38 | 56 | /turf/closed/wall/MouseDrop_T(mob/living/carbon/carbon_mob, mob/user)
|
39 | 57 | ..()
|
40 | 58 | if(carbon_mob != user)
|
|
108 | 126 | if(SSstation_coloring.wall_trims)
|
109 | 127 | trim_color = SSstation_coloring.get_default_color()
|
110 | 128 |
|
111 |
| -/turf/closed/wall/atom_destruction(damage_flag) |
112 |
| - . = ..() |
113 |
| - dismantle_wall(TRUE, FALSE) |
114 |
| - |
115 | 129 | /turf/closed/wall/Destroy()
|
116 | 130 | if(is_station_level(z))
|
117 | 131 | GLOB.station_turfs -= src
|
|
122 | 136 | . += ..()
|
123 | 137 | . += deconstruction_hints(user)
|
124 | 138 |
|
| 139 | +//monkestation edit start |
| 140 | +/turf/closed/wall/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) |
| 141 | + . = ..() |
| 142 | + if(.) // add a dent if it took damage |
| 143 | + add_dent(WALL_DENT_HIT) |
| 144 | + |
| 145 | +/turf/closed/wall/attacked_by(obj/item/attacking_item, mob/living/user) |
| 146 | + if(!uses_integrity) |
| 147 | + CRASH("attacked_by() was called on an wall that doesn't use integrity!") |
| 148 | + |
| 149 | + if(!attacking_item.force) |
| 150 | + return |
| 151 | + |
| 152 | + var/damage = take_damage(attacking_item.force * attacking_item.demolition_mod, attacking_item.damtype, MELEE, 1) |
| 153 | + //only witnesses close by and the victim see a hit message. |
| 154 | + user.visible_message(span_danger("[user] hits [src] with [attacking_item][damage ? "." : ", without leaving a mark!"]"), \ |
| 155 | + span_danger("You hit [src] with [attacking_item][damage ? "." : ", without leaving a mark!"]"), null, COMBAT_MESSAGE_RANGE) |
| 156 | + log_combat(user, src, "attacked", attacking_item) |
| 157 | + |
| 158 | +/turf/closed/wall/run_atom_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration) |
| 159 | + if(damage_amount < damage_deflection && (damage_type in list(MELEE, BULLET, LASER, ENERGY))) |
| 160 | + return 0 // absolutely no bypassing damage deflection by using projectiles |
| 161 | + return ..() |
| 162 | + |
| 163 | +/turf/closed/wall/atom_destruction(damage_flag) |
| 164 | + . = ..() |
| 165 | + if(damage_flag == MELEE) |
| 166 | + playsound(src, 'sound/effects/meteorimpact.ogg', 50, TRUE) //Otherwise there's no sound for hitting the wall, since it's just dismantled |
| 167 | + dismantle_wall(TRUE, TRUE) |
| 168 | +//monkestation edit end |
| 169 | + |
125 | 170 | /turf/closed/wall/proc/deconstruction_hints(mob/user)
|
126 | 171 | return span_notice("The outer plating is <b>welded</b> firmly in place.")
|
127 | 172 |
|
|
167 | 212 |
|
168 | 213 | /turf/closed/wall/ex_act(severity, target)
|
169 | 214 | if(target == src)
|
170 |
| - dismantle_wall(1,1) |
| 215 | + dismantle_wall(TRUE, TRUE) //monkestation edit |
171 | 216 | return
|
172 | 217 |
|
173 | 218 | switch(severity)
|
|
179 | 224 | if(EXPLODE_HEAVY)
|
180 | 225 | dismantle_wall(prob(50), TRUE)
|
181 | 226 | if(EXPLODE_LIGHT)
|
182 |
| - if (prob(hardness)) |
183 |
| - dismantle_wall(0,1) |
| 227 | + take_damage(150, BRUTE, BOMB) // less kaboom monkestation edit |
184 | 228 | if(!density)
|
185 | 229 | ..()
|
186 | 230 |
|
187 | 231 |
|
188 | 232 | /turf/closed/wall/blob_act(obj/structure/blob/B)
|
189 |
| - if(prob(50)) |
190 |
| - dismantle_wall() |
191 |
| - else |
192 |
| - add_dent(WALL_DENT_HIT) |
| 233 | + //monkestation edit start |
| 234 | + take_damage(400, BRUTE, MELEE, FALSE) |
| 235 | + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) |
| 236 | + //monkestation edit end |
193 | 237 |
|
194 | 238 | /turf/closed/wall/attack_paw(mob/living/user, list/modifiers)
|
195 | 239 | user.changeNext_move(CLICK_CD_MELEE)
|
|
202 | 246 | return
|
203 | 247 | if(arm.bodypart_disabled)
|
204 | 248 | return
|
205 |
| - if(prob(hardness)) |
206 |
| - playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) |
207 |
| - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") |
208 |
| - hulk_recoil(arm, user) |
209 |
| - dismantle_wall(1) |
210 |
| - |
211 |
| - else |
212 |
| - playsound(src, 'sound/effects/bang.ogg', 50, TRUE) |
213 |
| - add_dent(WALL_DENT_HIT) |
214 |
| - user.visible_message(span_danger("[user] smashes \the [src]!"), \ |
215 |
| - span_danger("You smash \the [src]!"), \ |
216 |
| - span_hear("You hear a booming smash!")) |
| 249 | + //monkestation edit start |
| 250 | + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") |
| 251 | + take_damage(400, BRUTE, MELEE, FALSE) |
| 252 | + playsound(src, 'sound/effects/bang.ogg', 50, 1) |
| 253 | + to_chat(user, span_notice("You punch the wall.")) |
| 254 | + hulk_recoil(arm, user) |
217 | 255 | return TRUE
|
| 256 | + //monkestation edit end |
218 | 257 |
|
219 | 258 | /**
|
220 | 259 | *Deals damage back to the hulk's arm.
|
|
243 | 282 | playsound(src, 'sound/weapons/genhit.ogg', 25, TRUE)
|
244 | 283 | add_fingerprint(user)
|
245 | 284 |
|
246 |
| -/turf/closed/wall/attackby(obj/item/W, mob/user, params) |
| 285 | +/turf/closed/wall/attackby(obj/item/attacking_item, mob/user, params) //monkestation edit |
247 | 286 | user.changeNext_move(CLICK_CD_MELEE)
|
248 | 287 | if (!ISADVANCEDTOOLUSER(user))
|
249 | 288 | to_chat(user, span_warning("You don't have the dexterity to do this!"))
|
|
256 | 295 | add_fingerprint(user)
|
257 | 296 |
|
258 | 297 | //the istype cascade has been spread among various procs for easy overriding
|
259 |
| - if(try_clean(W, user) || try_wallmount(W, user) || try_decon(W, user)) |
| 298 | + if(try_clean(attacking_item, user) || try_wallmount(attacking_item, user) || try_decon(attacking_item, user)) //monkestation edit |
260 | 299 | return
|
261 | 300 |
|
262 |
| - return ..() |
| 301 | + return ..() || (attacking_item.attack_atom(src, user)) |
263 | 302 |
|
264 | 303 | /turf/closed/wall/proc/try_clean(obj/item/W, mob/living/user, turf/T)
|
265 |
| - if(((user.istate & ISTATE_HARM)) || !LAZYLEN(dent_decals)) |
| 304 | + if(!(user.istate & ISTATE_HARM)) //monkestation edit |
266 | 305 | return FALSE
|
267 | 306 |
|
| 307 | + //monkestation edit start |
268 | 308 | if(W.tool_behaviour == TOOL_WELDER)
|
269 |
| - if(!W.tool_start_check(user, amount=0)) |
270 |
| - return FALSE |
| 309 | + if(atom_integrity >= max_integrity) |
| 310 | + to_chat(user, span_warning("[src] is intact!")) |
| 311 | + return TRUE |
271 | 312 |
|
272 |
| - to_chat(user, span_notice("You begin fixing dents on the wall...")) |
273 |
| - if(W.use_tool(src, user, 0, volume=100)) |
274 |
| - if(iswallturf(src) && LAZYLEN(dent_decals)) |
275 |
| - to_chat(user, span_notice("You fix some dents on the wall.")) |
276 |
| - cut_overlay(dent_decals) |
277 |
| - dent_decals.Cut() |
| 313 | + if(!W.tool_start_check(user, amount=0)) |
| 314 | + to_chat(user, span_warning("You need more fuel to repair [src]!")) |
278 | 315 | return TRUE
|
279 | 316 |
|
| 317 | + to_chat(user, span_notice("You begin repairing [src]...")) |
| 318 | + if(W.use_tool(src, user, 3 SECONDS, volume=100)) |
| 319 | + update_integrity(max_integrity) |
| 320 | + to_chat(user, span_notice("You repair [src].")) |
| 321 | + cut_overlay(dent_decals) |
| 322 | + dent_decals.Cut() |
| 323 | + return TRUE |
| 324 | + return TRUE |
| 325 | + //monkestation edit end |
280 | 326 | return FALSE
|
281 | 327 |
|
282 | 328 | /turf/closed/wall/proc/try_wallmount(obj/item/W, mob/user)
|
|
308 | 354 | return FALSE
|
309 | 355 |
|
310 | 356 | /turf/closed/wall/singularity_pull(S, current_size)
|
311 |
| - ..() |
312 |
| - wall_singularity_pull(current_size) |
| 357 | + . = ..() |
| 358 | + //monkestation edit start |
| 359 | + if(current_size >= STAGE_FIVE) |
| 360 | + take_damage(300, armour_penetration=100) // LORD SINGULOTH CARES NOT FOR YOUR "ARMOR" |
| 361 | + else if(current_size == STAGE_FOUR) |
| 362 | + take_damage(150, armour_penetration=100) |
| 363 | + //monkestation edit end |
313 | 364 |
|
| 365 | +/* //MONKESTATION REMOVAL: Deprecated, obselete old code proc |
314 | 366 | /turf/closed/wall/proc/wall_singularity_pull(current_size)
|
315 | 367 | if(current_size >= STAGE_FIVE)
|
316 | 368 | if(prob(50))
|
|
319 | 371 | if(current_size == STAGE_FOUR)
|
320 | 372 | if(prob(30))
|
321 | 373 | dismantle_wall()
|
| 374 | +*/ |
322 | 375 |
|
323 | 376 | /turf/closed/wall/narsie_act(force, ignore_mobs, probability = 20)
|
324 | 377 | . = ..()
|
|
358 | 411 | return TRUE
|
359 | 412 | return FALSE
|
360 | 413 |
|
361 |
| -/turf/closed/wall/proc/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8)) |
| 414 | +//monkestation edit start |
| 415 | +/turf/proc/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8)) // this only exists because turf code is terrible, monkestation |
| 416 | + return |
| 417 | + |
| 418 | +/turf/closed/wall/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8)) |
| 419 | +//monkestation edit end |
362 | 420 | if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS)
|
363 | 421 | return
|
364 | 422 |
|
|
0 commit comments